[FFmpeg-devel] [PATCH 2/2] doc/examples/muxing: Fix packet duration

Michael Niedermayer michael at niedermayer.cc
Sun Jul 17 05:10:39 EEST 2016


Set needed fields in st->codec

Fixes Ticket5684

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
 doc/examples/muxing.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/doc/examples/muxing.c b/doc/examples/muxing.c
index f1f5bb8..f1d0cfe 100644
--- a/doc/examples/muxing.c
+++ b/doc/examples/muxing.c
@@ -434,6 +434,8 @@ static void open_video(AVFormatContext *oc, AVCodec *codec, OutputStream *ost, A
         fprintf(stderr, "Could not copy the stream parameters\n");
         exit(1);
     }
+    ost->st->codec->ticks_per_frame = c->ticks_per_frame;
+    ost->st->codec->time_base       = c->time_base;
 }
 
 /* Prepare a dummy image. */
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list