avformat/matroskaenc: don't write a FlagInterlaced element if it would write the...
authorJames Almer <jamrial@gmail.com>
Tue, 11 Oct 2016 17:36:16 +0000 (14:36 -0300)
committerJames Almer <jamrial@gmail.com>
Tue, 11 Oct 2016 22:49:19 +0000 (19:49 -0300)
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."

Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
libavformat/matroskaenc.c
tests/fate/matroska.mak

index 5293a9b..a48f5bb 100644 (file)
@@ -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,
index 7de9a59..63a4252 100644 (file)
@@ -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)