]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
seek backwards 4 bytes if 'fLaC' marker is not found
authorjbr <jbr@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Sat, 21 Mar 2009 00:49:14 +0000 (00:49 +0000)
committerjbr <jbr@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Sat, 21 Mar 2009 00:49:14 +0000 (00:49 +0000)
git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18086 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavformat/flacdec.c

index 9db65bdd7d1b7f40a3f5e496f676ded3b35bd6bd..c8432145ce79947e199e827c1bb1f8e8d7706254 100644 (file)
@@ -50,8 +50,10 @@ static int flac_read_header(AVFormatContext *s,
     }
 
     /* if fLaC marker is not found, assume there is no header */
-    if (get_le32(s->pb) != MKTAG('f','L','a','C'))
+    if (get_le32(s->pb) != MKTAG('f','L','a','C')) {
+        url_fseek(s->pb, -4, SEEK_CUR);
         return 0;
+    }
 
     /* process metadata blocks */
     while (!url_feof(s->pb) && !metadata_last) {