[FFmpeg-devel] [PATCH] Revert "do not write f2 if not interlaced"

Sebastian Dröge slomo at coaxion.net
Fri Jan 29 12:39:03 CET 2016


From: Sebastian Dröge <sebastian at centricular.com>

This reverts commit 8ed82d8174a666f80ab8834e3617cbe91ae740a9.

SMPTE S377-1-2009c defines in F.4.1 that the Video Line Map should
always be an array with two 32 bit integers as elements. This is
repeated in G.2.12 with actual examples for progressive content,
where the second value would always be 0.

Additionally, the IRT MXF analyser also lists this as the only
error in the MXF output from ffmpeg: https://mxf-analyser-cloud.irt.de
---
 libavformat/mxfenc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
index e4e4272..07b8045 100644
--- a/libavformat/mxfenc.c
+++ b/libavformat/mxfenc.c
@@ -1081,12 +1081,12 @@ static void mxf_write_cdci_common(AVFormatContext *s, AVStream *st, const UID ke
         f1 *= 2;
     }
 
-    mxf_write_local_tag(pb, 12+sc->interlaced*4, 0x320D);
-    avio_wb32(pb, sc->interlaced ? 2 : 1);
+
+    mxf_write_local_tag(pb, 16, 0x320D);
+    avio_wb32(pb, 2);
     avio_wb32(pb, 4);
     avio_wb32(pb, f1);
-    if (sc->interlaced)
-        avio_wb32(pb, f2);
+    avio_wb32(pb, f2);
 
     mxf_write_local_tag(pb, 8, 0x320E);
     avio_wb32(pb, sc->aspect_ratio.num);
-- 
2.7.0



More information about the ffmpeg-devel mailing list