[FFmpeg-cvslog] lavf/dvenc: replace av_fifo_peek2() with av_fifo_generic_peek_at()

Anton Khirnov git at videolan.org
Mon Jan 10 17:15:10 EET 2022


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Thu Dec 30 12:57:48 2021 +0100| [d47dc0b0dfcc6010a57d4f2510c90b800ed40efc] | committer: Anton Khirnov

lavf/dvenc: replace av_fifo_peek2() with av_fifo_generic_peek_at()

This is the only remaining caller of av_fifo_peek2(), which will be
deprecated.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d47dc0b0dfcc6010a57d4f2510c90b800ed40efc
---

 libavformat/dvenc.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavformat/dvenc.c b/libavformat/dvenc.c
index 9a853ba7ce..b76539b59f 100644
--- a/libavformat/dvenc.c
+++ b/libavformat/dvenc.c
@@ -201,8 +201,9 @@ static void dv_inject_audio(DVMuxContext *c, int channel, uint8_t* frame_ptr)
                 if (of*2 >= size)
                     continue;
 
-                frame_ptr[d]   = *av_fifo_peek2(c->audio_data[channel], of*2+1); // FIXME: maybe we have to admit
-                frame_ptr[d+1] = *av_fifo_peek2(c->audio_data[channel], of*2);   //        that DV is a big-endian PCM
+                // FIXME: maybe we have to admit that DV is a big-endian PCM
+                av_fifo_generic_peek_at(c->audio_data[channel], frame_ptr + d, of * 2, 2, NULL);
+                FFSWAP(uint8_t, frame_ptr[d], frame_ptr[d + 1]);
             }
             frame_ptr += 16 * 80; /* 15 Video DIFs + 1 Audio DIF */
         }



More information about the ffmpeg-cvslog mailing list