[FFmpeg-devel] [PATCH] Remove the limitation of xiph laced headers to 3 headers

Aurelien Jacobs aurel
Thu Jul 30 22:56:54 CEST 2009


On Thu, Jul 30, 2009 at 12:58:39PM +0100, ogg.k.ogg.k at googlemail.com wrote:
> 

> From 8ea4efc5baab436ffeb798dbea05614ad563f7c0 Mon Sep 17 00:00:00 2001
> From: ogg.k.ogg.k <ogg.k.ogg.k at googlemail.com>
> Date: Thu, 30 Jul 2009 12:56:25 +0100
> Subject: [PATCH] Remove the limitation of Xiph laced headers to 3 headers

Could you explain what this is good for ?

> [...]
> 
> diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
> index a03b11b..4a757ce 100644
> --- a/libavformat/matroskaenc.c
> +++ b/libavformat/matroskaenc.c
> @@ -399,13 +399,14 @@ static int put_xiph_codecpriv(AVFormatContext *s, ByteIOContext *pb, AVCodecCont
>      int header_len[3];
>      int first_header_size;
>      int j;
> +    int nheaders = 3;
>  
>      if (codec->codec_id == CODEC_ID_VORBIS)
>          first_header_size = 30;
>      else
>          first_header_size = 42;
>  
> -    if (ff_split_xiph_headers(codec->extradata, codec->extradata_size,
> +    if (ff_split_xiph_headers(codec->extradata, codec->extradata_size, nheaders,
>                                first_header_size, header_start, header_len) < 0) {

The temporary variable is useless.

Aurel



More information about the ffmpeg-devel mailing list