[FFmpeg-devel] [PATCH] avformat/matroskaenc: don't write a FlagInterlaced element if it would write the default value

James Almer jamrial at gmail.com
Wed Oct 12 00:33:24 EEST 2016


The spec says:
"Mandatory elements with a default value may be left out of the file. In the absence
of a mandatory element, the element's default value is used."

Signed-off-by: James Almer <jamrial at gmail.com>
---
 libavformat/matroskaenc.c | 2 --
 tests/fate/matroska.mak   | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index 5293a9b..a48f5bb 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -876,8 +876,6 @@ static void mkv_write_field_order(AVIOContext *pb, int mode,
 {
     switch (field_order) {
     case AV_FIELD_UNKNOWN:
-        put_ebml_uint(pb, MATROSKA_ID_VIDEOFLAGINTERLACED,
-                      MATROSKA_VIDEO_INTERLACE_FLAG_UNDETERMINED);
         break;
     case AV_FIELD_PROGRESSIVE:
         put_ebml_uint(pb, MATROSKA_ID_VIDEOFLAGINTERLACED,
diff --git a/tests/fate/matroska.mak b/tests/fate/matroska.mak
index 7de9a59..63a4252 100644
--- a/tests/fate/matroska.mak
+++ b/tests/fate/matroska.mak
@@ -4,6 +4,6 @@
 FATE_MATROSKA-$(call DEMMUX, MATROSKA, MATROSKA) += fate-matroska-remux
 fate-matroska-remux: CMD = md5 -i $(TARGET_SAMPLES)/vp9-test-vectors/vp90-2-2pass-akiyo.webm -color_trc 4 -c:v copy -fflags +bitexact -strict -2 -f matroska
 fate-matroska-remux: CMP = oneline
-fate-matroska-remux: REF = d1a5fc15908ba10ca3efa282059ca79f
+fate-matroska-remux: REF = 84e950f59677e306f944fca484888c5d
 
 FATE_SAMPLES_AVCONV += $(FATE_MATROSKA-yes)
-- 
2.9.1



More information about the ffmpeg-devel mailing list