[FFmpeg-devel] [PATCH] ADTS AAC with ID3v2

Michael Niedermayer michaelni
Fri Jan 23 18:11:24 CET 2009


On Fri, Jan 23, 2009 at 08:51:33AM -0800, David DeHaven wrote:
[...]
>>> +    if(memcmp(bptr, "fLaC", 4)) return 0;
>>> +    else                        return AVPROBE_SCORE_MAX / 2;
>>
>> this mixes cosmetics and functionnal changes.
>
> Tell you what, I'll change bptr to bufptr and avoid the cosmically huge 
> cosmetic change of deleting two spaces.
[...]
> @@ -573,7 +586,12 @@
>  #if CONFIG_FLAC_DEMUXER
>  static int flac_probe(AVProbeData *p)
>  {
> -    if(memcmp(p->buf, "fLaC", 4)) return 0;
> +    uint8_t *bufptr = p->buf;
> +
> +    if(ff_id3v2_match(bufptr))
> +        bptr += ff_id3v2_tag_len(bufptr);
> +
> +    if(memcmp(bufptr, "fLaC", 4)) return 0;
>      else                          return AVPROBE_SCORE_MAX / 2;
>  }
>  #endif

how did you get the compiler past bptr?

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Its not that you shouldnt use gotos but rather that you should write
readable code and code with gotos often but not always is less readable
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090123/b1736839/attachment.pgp>



More information about the ffmpeg-devel mailing list