From c957c8542676d092af1a812860c0b379738b7f01 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Reimar=20D=C3=B6ffinger?= <Reimar.Doeffinger@gmx.de>
Date: Sun, 8 Mar 2009 14:42:11 +0000
Subject: [PATCH] Replace all uses of the replaced av_fifo_read by
 av_fifo_generic_read

Originally committed as revision 17873 to svn://svn.ffmpeg.org/ffmpeg/trunk
---
 ffmpeg.c                      | 4 ++--
 libavformat/audiointerleave.c | 2 +-
 libavutil/fifo.c              | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index 72156e22539..8a5e0e4ed1b 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -672,7 +672,7 @@ static void do_audio_out(AVFormatContext *s,
             AVPacket pkt;
             av_init_packet(&pkt);
 
-            av_fifo_read(ost->fifo, audio_buf, frame_bytes);
+            av_fifo_generic_read(ost->fifo, frame_bytes, NULL, audio_buf);
 
             //FIXME pass ost->sync_opts as AVFrame.pts in avcodec_encode_audio()
 
@@ -1452,7 +1452,7 @@ static int output_packet(AVInputStream *ist, int ist_index,
                             if(fifo_bytes > 0 && enc->codec->capabilities & CODEC_CAP_SMALL_LAST_FRAME) {
                                 int fs_tmp = enc->frame_size;
                                 enc->frame_size = fifo_bytes / (2 * enc->channels);
-                                av_fifo_read(ost->fifo, (uint8_t *)samples, fifo_bytes);
+                                av_fifo_generic_read(ost->fifo, fifo_bytes, NULL, samples);
                                     ret = avcodec_encode_audio(enc, bit_buffer, bit_buffer_size, samples);
                                 enc->frame_size = fs_tmp;
                             }
diff --git a/libavformat/audiointerleave.c b/libavformat/audiointerleave.c
index a4396f5bfa0..11f0093d559 100644
--- a/libavformat/audiointerleave.c
+++ b/libavformat/audiointerleave.c
@@ -80,7 +80,7 @@ static int ff_interleave_new_audio_packet(AVFormatContext *s, AVPacket *pkt,
         return 0;
 
     av_new_packet(pkt, size);
-    av_fifo_read(aic->fifo, pkt->data, size);
+    av_fifo_generic_read(aic->fifo, size, NULL, pkt->data);
 
     pkt->dts = pkt->pts = aic->dts;
     pkt->duration = av_rescale_q(*aic->samples, st->time_base, aic->time_base);
diff --git a/libavutil/fifo.c b/libavutil/fifo.c
index 2df177dd7ea..26a81657d9e 100644
--- a/libavutil/fifo.c
+++ b/libavutil/fifo.c
@@ -63,7 +63,7 @@ int av_fifo_realloc2(AVFifoBuffer *f, unsigned int new_size) {
 
         if (!f2)
             return -1;
-        av_fifo_read(f, f2->buffer, len);
+        av_fifo_generic_read(f, len, NULL, f2->buffer);
         f2->wptr += len;
         f2->wndx += len;
         av_free(f->buffer);
-- 
GitLab