[FFmpeg-devel] [PATCH 21/28] added: make libavformat expose the FORCED flag from matroska as a disposition
Aurelien Jacobs
aurel
Thu Jul 1 16:35:36 CEST 2010
On Wed, Jun 30, 2010 at 10:09:49AM +0100, Mans Rullgard wrote:
> 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
> @@ -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} },
According to the matroska spec, the default value for FlagForced is 0,
not 1.
> @@ -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;
AV_DISPOSITION_FORCED is not defined anywhere...
Attached patch fixes this. I will commit it if it's OK to define this
new AV_DISPOSITION_FORCED.
Aurel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mkv_forced.diff
Type: text/x-diff
Size: 2155 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100701/c642d880/attachment.diff>
More information about the ffmpeg-devel
mailing list