[FFmpeg-devel] [PATCH 21/28] added: make libavformat expose the FORCED flag from matroska as a disposition
Mans Rullgard
mans
Wed Jun 30 11:09:49 CEST 2010
From: Cory Fields <theuni-nospam- at xbmc.org>
---
libavformat/matroskadec.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 69c81b0..0589589 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -139,6 +139,7 @@ typedef struct {
double time_scale;
uint64_t default_duration;
uint64_t flag_default;
+ uint64_t flag_forced;
MatroskaTrackVideo video;
MatroskaTrackAudio audio;
EbmlList encodings;
@@ -340,7 +341,7 @@ static EbmlSyntax matroska_track[] = {
{ MATROSKA_ID_TRACKAUDIO, EBML_NEST, 0, offsetof(MatroskaTrack,audio), {.n=matroska_track_audio} },
{ MATROSKA_ID_TRACKCONTENTENCODINGS,EBML_NEST, 0, 0, {.n=matroska_track_encodings} },
{ MATROSKA_ID_TRACKFLAGENABLED, EBML_NONE },
- { MATROSKA_ID_TRACKFLAGFORCED, EBML_NONE },
+ { MATROSKA_ID_TRACKFLAGFORCED, EBML_UINT, 0, offsetof(MatroskaTrack,flag_forced), {.u=1} },
{ MATROSKA_ID_TRACKFLAGLACING, EBML_NONE },
{ MATROSKA_ID_CODECNAME, EBML_NONE },
{ MATROSKA_ID_CODECDECODEALL, EBML_NONE },
@@ -1391,6 +1392,8 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap)
if (track->flag_default)
st->disposition |= AV_DISPOSITION_DEFAULT;
+ if (track->flag_forced)
+ st->disposition |= AV_DISPOSITION_FORCED;
if (track->default_duration)
av_reduce(&st->codec->time_base.num, &st->codec->time_base.den,
--
1.7.1.1
More information about the ffmpeg-devel
mailing list