[FFmpeg-cvslog] mxf: honor timecode drop flag in mxf muxer if set.

Clément Bœsch git at videolan.org
Sat Aug 13 19:16:43 CEST 2011


ffmpeg | branch: master | Clément Bœsch <clement.boesch at smartjog.com> | Tue Jul 26 11:31:00 2011 +0200| [b49fe589ea83d0ea1fdcad01a2f287d68e7bd728] | committer: Clément Bœsch

mxf: honor timecode drop flag in mxf muxer if set.

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

 libavformat/mxfenc.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
index fe7c967..0acd74b 100644
--- a/libavformat/mxfenc.c
+++ b/libavformat/mxfenc.c
@@ -1566,7 +1566,10 @@ static void mxf_write_system_item(AVFormatContext *s)
     avio_wb64(pb, 0); // creation date/time stamp
 
     avio_w8(pb, 0x81); // SMPTE 12M time code
-    time_code = ff_framenum_to_smtpe_timecode(frame, mxf->timecode_base,
+    time_code = frame;
+    if (mxf->tc.drop)
+        time_code = ff_framenum_to_drop_timecode(time_code);
+    time_code = ff_framenum_to_smtpe_timecode(time_code, mxf->timecode_base,
                                               mxf->tc.drop);
     avio_wb32(pb, time_code);
     avio_wb32(pb, 0); // binary group data



More information about the ffmpeg-cvslog mailing list