aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Coalson <>2007-11-04 00:06:33 +0000
committerJustin Ruggles <justin.ruggles@gmail.com>2007-11-04 00:06:33 +0000
commit0cb2774a4aa593fae3fb523e550ec89d68e0ab94 (patch)
treeaef49c4d372aee4a41e1555ada138e8fb5cce4bb
parente471443ab5eefd05fd8267b96398c6c83a3725e8 (diff)
downloadffmpeg-0cb2774a4aa593fae3fb523e550ec89d68e0ab94.tar.gz
Add decoding support for variable block size FLAC files using the latest FLAC
specification. Patch by Josh Coalson. Originally committed as revision 10916 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/flac.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/flac.c b/libavcodec/flac.c
index e949a46655..6f66de74ea 100644
--- a/libavcodec/flac.c
+++ b/libavcodec/flac.c
@@ -628,9 +628,9 @@ static int flac_decode_frame(AVCodecContext *avctx,
if (!metadata_parse(s))
{
tmp = show_bits(&s->gb, 16);
- if(tmp != 0xFFF8){
+ if((tmp & 0xFFFE) != 0xFFF8){
av_log(s->avctx, AV_LOG_ERROR, "FRAME HEADER not here\n");
- while(get_bits_count(&s->gb)/8+2 < buf_size && show_bits(&s->gb, 16) != 0xFFF8)
+ while(get_bits_count(&s->gb)/8+2 < buf_size && (show_bits(&s->gb, 16) & 0xFFFE) != 0xFFF8)
skip_bits(&s->gb, 8);
goto end; // we may not have enough bits left to decode a frame, so try next time
}