[FFmpeg-devel] [PATCH/RFC]av_codec_get_tag() cannot work for Matroska (Ticket 8)

Aurelien Jacobs aurel at gnuage.org
Sun Aug 28 22:35:24 CEST 2011


On Fri, Aug 26, 2011 at 02:47:36PM +0200, Carl Eugen Hoyos wrote:
> On Wednesday 24 August 2011 02:37:33 pm Carl Eugen Hoyos wrote:
> 
> > Attached is a try to fix this by adding the missing audio codec_tags (I
> >  will do similar for subtitles and video if needed), I would be glad if a
> >  simpler solution is possible like not to try to validate the codec_tag for
> >  matroska.
> 
> Attached is a third possible patch to fix the problem.
> 
> Carl Eugen

> diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
> index 0910da5..d7610cf 100644
> --- a/libavformat/matroskaenc.c
> +++ b/libavformat/matroskaenc.c
> @@ -1235,7 +1235,6 @@ AVOutputFormat ff_matroska_muxer = {
>      .write_packet      = mkv_write_packet,
>      .write_trailer     = mkv_write_trailer,
>      .flags             = AVFMT_GLOBALHEADER | AVFMT_VARIABLE_FPS,
> -    .codec_tag         = (const AVCodecTag* const []){ff_codec_bmp_tags, ff_codec_wav_tags, 0},
>      .subtitle_codec    = CODEC_ID_SSA,
>      .query_codec       = mkv_query_codec,
>  };
> @@ -1274,6 +1273,5 @@ AVOutputFormat ff_matroska_audio_muxer = {
>      .write_packet      = mkv_write_packet,
>      .write_trailer     = mkv_write_trailer,
>      .flags = AVFMT_GLOBALHEADER,
> -    .codec_tag = (const AVCodecTag* const []){ff_codec_wav_tags, 0},
>  };
>  #endif

Looks OK to me.

Aurel


More information about the ffmpeg-devel mailing list