[Ffmpeg-devel] [PATCH] Matroska keep extradata for some codec

Måns Rullgård mru
Mon Nov 6 19:47:13 CET 2006


Steve Lhomme <slhomme at divxcorp.com> writes:

> Hi,
>
> As the title suggests... The extradata are used by some codec. AAC is
> not handled because we don't support it cleanly enough for now.
>
> Steve
> Index: libavformat/matroska.c
> ===================================================================
> --- libavformat/matroska.c	(revision 6884)
> +++ libavformat/matroska.c	(working copy)
> @@ -2196,6 +2196,20 @@
>
>              }
>
> +            else if (codec_id == CODEC_ID_RV40 ||
> +                     codec_id == CODEC_ID_RV30 ||
> +                     codec_id == CODEC_ID_RV20 ||
> +                     codec_id == CODEC_ID_RV10 ||
> +                     codec_id == CODEC_ID_VORBIS) {
> +                extradata_size = track->codec_priv_size;
> +                if(extradata_size) {
> +                    extradata = av_malloc(extradata_size);
> +                    if(extradata == NULL)
> +                        return AVERROR_NOMEM;
> +                    memcpy(extradata, track->codec_priv, extradata_size);
> +                }
> +            }
> +

Why not always save the extradata if there is some?

-- 
M?ns Rullg?rd
mru at inprovide.com




More information about the ffmpeg-devel mailing list