diff options
author | John Stebbins <stebbins@jetheaddev.com> | 2013-08-22 08:54:59 -0700 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2013-08-27 14:00:31 +0200 |
commit | f812eeda17e38797df5cb733ce99cdfd829d84ca (patch) | |
tree | fcbe278455a84b14471088d9eb5306bac1436d08 /libavformat | |
parent | 0fb3e1c6ce50ae4366c7e5571f2a8278d7fd6297 (diff) | |
download | ffmpeg-streaming-f812eeda17e38797df5cb733ce99cdfd829d84ca.zip ffmpeg-streaming-f812eeda17e38797df5cb733ce99cdfd829d84ca.tar.gz |
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>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/matroskaenc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 610787d..825e92c 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -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, |