[FFmpeg-soc] [soc]: r2922 - mxf/mxfenc.c

Aurelien Jacobs aurel at gnuage.org
Thu Jul 31 00:09:19 CEST 2008


spyfeng wrote:

> Author: spyfeng
> Date: Wed Jul 30 16:51:09 2008
> New Revision: 2922
> 
> Log:
> check the condition when using LIBAVFORMAT_IDENT 
> 
> 
> Modified:
>    mxf/mxfenc.c
> 
> Modified: mxf/mxfenc.c
> ==============================================================================
> --- mxf/mxfenc.c	(original)
> +++ mxf/mxfenc.c	Wed Jul 30 16:51:09 2008
> @@ -438,8 +438,12 @@ static int mxf_write_identification(AVFo
>  
>      company_name_len = strlen("FFmpeg") + 1;
>      product_name_len = strlen("OP1a Muxer") + 1;
> -    version_string_len = strlen(LIBAVFORMAT_IDENT) + 1;
> -    length = 84 + company_name_len + product_name_len + version_string_len;
> +    if (!(s->streams[0]->codec->flags & CODEC_FLAG_BITEXACT)) {
> +        version_string_len = strlen(LIBAVFORMAT_IDENT) + 1;
> +        length = 84 + company_name_len + product_name_len + version_string_len;
> +    } else {
> +        length = 80 + company_name_len + product_name_len;
> +    }

This could easily be simplified:

    length = 80 + company_name_len + product_name_len;
    if (!(s->streams[0]->codec->flags & CODEC_FLAG_BITEXACT))
      length += 4 + sizeof(LIBAVFORMAT_IDENT);

Aurel



More information about the FFmpeg-soc mailing list