[FFmpeg-cvslog] avformat/nullenc: Use ff_interleave_packet_passthrough()

Andreas Rheinhardt git at videolan.org
Fri Nov 19 19:20:19 EET 2021


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Sat Oct  9 16:34:13 2021 +0200| [ce8f77a903e1108bde774d5e0e59d8cd24f18c46] | committer: Andreas Rheinhardt

avformat/nullenc: Use ff_interleave_packet_passthrough()

It avoids the overhead of the packet list; furthermore, using
ff_interleave_packet_per_dts() is wrong for the null muxer anyway,
because said muxer accepts packets without timestamps, which
ff_interleave_packet_per_dts() can't handle.

Reviewed-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

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

 libavformat/nullenc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/nullenc.c b/libavformat/nullenc.c
index 7354913726..d4769d5920 100644
--- a/libavformat/nullenc.c
+++ b/libavformat/nullenc.c
@@ -20,6 +20,7 @@
  */
 
 #include "avformat.h"
+#include "internal.h"
 
 static int null_write_packet(struct AVFormatContext *s, AVPacket *pkt)
 {
@@ -33,4 +34,5 @@ const AVOutputFormat ff_null_muxer = {
     .video_codec       = AV_CODEC_ID_WRAPPED_AVFRAME,
     .write_packet      = null_write_packet,
     .flags             = AVFMT_VARIABLE_FPS | AVFMT_NOFILE | AVFMT_NOTIMESTAMPS,
+    .interleave_packet = ff_interleave_packet_passthrough,
 };



More information about the ffmpeg-cvslog mailing list