diff mbox series

[FFmpeg-devel,3/3] avformat/nullenc: Use ff_interleave_packet_passthrough()

Message ID AM7PR03MB6660C71660028359538137F28FB39@AM7PR03MB6660.eurprd03.prod.outlook.com
State New
Headers show
Series [FFmpeg-devel,1/3] avformat/mux: Store pointer to interleavement func in FFFormatContext
Related show

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Andreas Rheinhardt Oct. 9, 2021, 3:14 p.m. UTC
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.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavformat/nullenc.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Paul B Mahol Oct. 9, 2021, 3:23 p.m. UTC | #1
lgtm
diff mbox series

Patch

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,
 };