matroskaenc: Fix writing TRACKDEFAULTFLAG

The element was only being written when the value == 1.  But the default
value of this element is 1, so this has no useful effect.  This element
needs to be written when the value == 0.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
pull/37/head
John Stebbins 12 years ago committed by Anton Khirnov
parent 0fb3e1c6ce
commit f812eeda17
  1. 4
      libavformat/matroskaenc.c
  2. 4
      tests/fate/wavpack.mak
  3. 4
      tests/ref/lavf/mkv
  4. 44
      tests/ref/seek/lavf-mkv

@ -587,7 +587,9 @@ static int mkv_write_tracks(AVFormatContext *s)
tag = av_dict_get(st->metadata, "language", NULL, 0);
put_ebml_string(pb, MATROSKA_ID_TRACKLANGUAGE, tag ? tag->value:"und");
if (st->disposition)
// The default value for TRACKFLAGDEFAULT is 1, so add element
// if we need to clear it.
if (!(st->disposition & AV_DISPOSITION_DEFAULT))
put_ebml_uint(pb, MATROSKA_ID_TRACKFLAGDEFAULT, !!(st->disposition & AV_DISPOSITION_DEFAULT));
// look for a codec ID string specific to mkv to use,

@ -91,12 +91,12 @@ fate-wavpack-matroskamode: CMD = md5 -i $(TARGET_SAMPLES)/wavpack/special/matros
FATE_WAVPACK-$(call DEMMUX, WV, MATROSKA) += fate-wavpack-matroska_mux-mono
fate-wavpack-matroska_mux-mono: CMD = md5 -i $(TARGET_SAMPLES)/wavpack/num_channels/mono_16bit_int.wv -c copy -flags +bitexact -f matroska
fate-wavpack-matroska_mux-mono: CMP = oneline
fate-wavpack-matroska_mux-mono: REF = f471da7c71cd01d5fb81efb1d740504f
fate-wavpack-matroska_mux-mono: REF = 6bd769b3f0e9d7fa6261c3b73a53eb7d
FATE_WAVPACK-$(call DEMMUX, WV, MATROSKA) += fate-wavpack-matroska_mux-61
fate-wavpack-matroska_mux-61: CMD = md5 -i $(TARGET_SAMPLES)/wavpack/num_channels/eva_2.22_6.1_16bit-partial.wv -c copy -flags +bitexact -f matroska
fate-wavpack-matroska_mux-61: CMP = oneline
fate-wavpack-matroska_mux-61: REF = cbbd0ce7eabef52235bcdd2cb0690f24
fate-wavpack-matroska_mux-61: REF = 2d2f1e7f81a8b1983fcffc7f24de8a11
FATE_SAMPLES_AVCONV += $(FATE_WAVPACK-yes)
fate-wavpack: $(FATE_WAVPACK-yes)

@ -1,3 +1,3 @@
7aa1846929e5fa4f5f2b1a0bc243218f *./tests/data/lavf/lavf.mkv
320262 ./tests/data/lavf/lavf.mkv
7c21e1e6b4fe71f361564f8eebedf4e1 *./tests/data/lavf/lavf.mkv
320268 ./tests/data/lavf/lavf.mkv
./tests/data/lavf/lavf.mkv CRC=0x7d5d3cda

@ -1,53 +1,53 @@
ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 512 size: 208
ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 518 size: 208
ret: 0 st:-1 flags:0 ts:-1.000000
ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 728 size: 27837
ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 734 size: 27837
ret: 0 st:-1 flags:1 ts: 1.894167
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292150 size: 27834
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292156 size: 27834
ret: 0 st: 0 flags:0 ts: 0.788000
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292150 size: 27834
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292156 size: 27834
ret: 0 st: 0 flags:1 ts:-0.317000
ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 728 size: 27837
ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 734 size: 27837
ret: 0 st: 1 flags:0 ts: 2.577000
ret:-EOF
ret: 0 st: 1 flags:1 ts: 1.471000
ret: 0 st: 1 flags:1 dts: 0.993000 pts: 0.993000 pos: 319991 size: 209
ret: 0 st: 1 flags:1 dts: 0.993000 pts: 0.993000 pos: 319997 size: 209
ret: 0 st:-1 flags:0 ts: 0.365002
ret: 0 st: 0 flags:1 dts: 0.491000 pts: 0.491000 pos: 146703 size: 27925
ret: 0 st: 0 flags:1 dts: 0.491000 pts: 0.491000 pos: 146709 size: 27925
ret: 0 st:-1 flags:1 ts:-0.740831
ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 728 size: 27837
ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 734 size: 27837
ret: 0 st: 0 flags:0 ts: 2.153000
ret:-EOF
ret: 0 st: 0 flags:1 ts: 1.048000
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292150 size: 27834
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292156 size: 27834
ret: 0 st: 1 flags:0 ts:-0.058000
ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 512 size: 208
ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 518 size: 208
ret: 0 st: 1 flags:1 ts: 2.836000
ret: 0 st: 1 flags:1 dts: 0.993000 pts: 0.993000 pos: 319991 size: 209
ret: 0 st: 1 flags:1 dts: 0.993000 pts: 0.993000 pos: 319997 size: 209
ret: 0 st:-1 flags:0 ts: 1.730004
ret:-EOF
ret: 0 st:-1 flags:1 ts: 0.624171
ret: 0 st: 0 flags:1 dts: 0.491000 pts: 0.491000 pos: 146703 size: 27925
ret: 0 st: 0 flags:1 dts: 0.491000 pts: 0.491000 pos: 146709 size: 27925
ret: 0 st: 0 flags:0 ts:-0.482000
ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 728 size: 27837
ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 734 size: 27837
ret: 0 st: 0 flags:1 ts: 2.413000
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292150 size: 27834
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292156 size: 27834
ret: 0 st: 1 flags:0 ts: 1.307000
ret:-EOF
ret: 0 st: 1 flags:1 ts: 0.201000
ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 512 size: 208
ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 518 size: 208
ret: 0 st:-1 flags:0 ts:-0.904994
ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 728 size: 27837
ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 734 size: 27837
ret: 0 st:-1 flags:1 ts: 1.989173
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292150 size: 27834
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292156 size: 27834
ret: 0 st: 0 flags:0 ts: 0.883000
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292150 size: 27834
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292156 size: 27834
ret: 0 st: 0 flags:1 ts:-0.222000
ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 728 size: 27837
ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 734 size: 27837
ret: 0 st: 1 flags:0 ts: 2.672000
ret:-EOF
ret: 0 st: 1 flags:1 ts: 1.566000
ret: 0 st: 1 flags:1 dts: 0.993000 pts: 0.993000 pos: 319991 size: 209
ret: 0 st: 1 flags:1 dts: 0.993000 pts: 0.993000 pos: 319997 size: 209
ret: 0 st:-1 flags:0 ts: 0.460008
ret: 0 st: 0 flags:1 dts: 0.491000 pts: 0.491000 pos: 146703 size: 27925
ret: 0 st: 0 flags:1 dts: 0.491000 pts: 0.491000 pos: 146709 size: 27925
ret: 0 st:-1 flags:1 ts:-0.645825
ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 728 size: 27837
ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 734 size: 27837

Loading…
Cancel
Save