aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/flacdec.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2009-03-21 00:49:14 +0000
committerJustin Ruggles <justin.ruggles@gmail.com>2009-03-21 00:49:14 +0000
commit29b0d168e68569fe556d800abb0b41c20efb17ff (patch)
treef82e324ef5d30bed1d81cbd18769d0111ab89d1c /libavformat/flacdec.c
parentd9e7fa8074c2ecbaefce76b214fddf79d5f4464f (diff)
downloadffmpeg-29b0d168e68569fe556d800abb0b41c20efb17ff.tar.gz
seek backwards 4 bytes if 'fLaC' marker is not found
Originally committed as revision 18086 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/flacdec.c')
-rw-r--r--libavformat/flacdec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/flacdec.c b/libavformat/flacdec.c
index 9db65bdd7d..c8432145ce 100644
--- a/libavformat/flacdec.c
+++ b/libavformat/flacdec.c
@@ -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) {