diff flacdec.c @ 6121:81614e9b541b libavformat

Generalize ID3v2 functions to support ID3v2-like ID headers with a different magic in the header (mainly targeted to Sony's .oma/.aa3 format). Patch by Michael Karcher, ffmpeg A mkarcher dialup fu-berlin de
author cehoyos
date Fri, 11 Jun 2010 13:44:57 +0000
parents 08cd1179a20d
children 4775a49a6045
line wrap: on
line diff
--- a/flacdec.c	Fri Jun 11 13:28:42 2010 +0000
+++ b/flacdec.c	Fri Jun 11 13:44:57 2010 +0000
@@ -43,7 +43,7 @@
 
     /* skip ID3v2 header if found */
     ret = get_buffer(s->pb, buf, ID3v2_HEADER_SIZE);
-    if (ret == ID3v2_HEADER_SIZE && ff_id3v2_match(buf)) {
+    if (ret == ID3v2_HEADER_SIZE && ff_id3v2_match(buf, ID3v2_DEFAULT_MAGIC)) {
         int len = ff_id3v2_tag_len(buf);
         url_fseek(s->pb, len - ID3v2_HEADER_SIZE, SEEK_CUR);
     } else {
@@ -130,7 +130,7 @@
     uint8_t *bufptr = p->buf;
     uint8_t *end    = p->buf + p->buf_size;
 
-    if(ff_id3v2_match(bufptr))
+    if(ff_id3v2_match(bufptr, ID3v2_DEFAULT_MAGIC))
         bufptr += ff_id3v2_tag_len(bufptr);
 
     if(bufptr > end-4 || memcmp(bufptr, "fLaC", 4)) return 0;