[FFmpeg-devel] [PATCH 2/2] Add ID support for .oma/.aa3
Reimar Döffinger
Reimar.Doeffinger
Mon Jun 7 23:51:41 CEST 2010
On Mon, Jun 07, 2010 at 09:48:38AM +0200, Michael Karcher wrote:
> @@ -182,9 +168,14 @@
>
> static int oma_read_probe(AVProbeData *p)
> {
> - if (!memcmp(p->buf, ((const uint8_t[]){'e', 'a', '3', 3, 0}), 5) ||
> - (!memcmp(p->buf, "EA3", 3) &&
> - !p->buf[4] && p->buf[5] == EA3_HEADER_SIZE))
> + const uint8_t *buf;
> +
> + buf = p->buf;
> + if(ff_id3v2_match(buf, ID3v2_EA3_MAGIC)) {
> + buf += ff_id3v2_tag_len(buf);
> + }
> +
> + if (!memcmp(buf, "EA3", 3) && !buf[4] && buf[5] == EA3_HEADER_SIZE)
Uh, no buffer size check?
And missing space after "if" and unnecessary {}
More information about the ffmpeg-devel
mailing list