diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2008-07-13 21:51:29 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2008-07-13 21:51:29 +0000 |
commit | 4c453ddbbccf3cdd611107e33bd21c9c76c94561 (patch) | |
tree | 4045ec83a248f78b27b564caa2148d10db452656 | |
parent | 4a8361f848945b79eac601d04ca05d1125609c74 (diff) | |
download | ffmpeg-4c453ddbbccf3cdd611107e33bd21c9c76c94561.tar.gz |
Make our flac decoder decode all the data at EOF.
Fixes issue524
Originally committed as revision 14223 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/flac.c | 3 | ||||
-rw-r--r-- | tests/ffmpeg.regression.ref | 4 | ||||
-rw-r--r-- | tests/libav.regression.ref | 2 | ||||
-rw-r--r-- | tests/rotozoom.regression.ref | 4 |
4 files changed, 7 insertions, 6 deletions
diff --git a/libavcodec/flac.c b/libavcodec/flac.c index baf47b1382..446ccb949b 100644 --- a/libavcodec/flac.c +++ b/libavcodec/flac.c @@ -624,7 +624,7 @@ static int flac_decode_frame(AVCodecContext *avctx, buf_size += s->bitstream_size; s->bitstream_size= buf_size; - if(buf_size < s->max_framesize){ + if(buf_size < s->max_framesize && input_buf_size){ // printf("wanna more data ...\n"); return input_buf_size; } @@ -773,6 +773,7 @@ AVCodec flac_decoder = { NULL, flac_decode_close, flac_decode_frame, + CODEC_CAP_DELAY, .flush= flac_flush, .long_name= NULL_IF_CONFIG_SMALL("FLAC (Free Lossless Audio Codec)"), }; diff --git a/tests/ffmpeg.regression.ref b/tests/ffmpeg.regression.ref index 7bdea4db97..bcdf078ea3 100644 --- a/tests/ffmpeg.regression.ref +++ b/tests/ffmpeg.regression.ref @@ -195,8 +195,8 @@ e48b800e2d9be6afcd430d4f08a34eb6 *./tests/data/adpcm_swf.vsynth.out.wav stddev:934.30 PSNR:36.91 bytes:1056768 c3382f03ce2efb5d475240d288a33898 *./tests/data/a-flac.flac 353368 ./tests/data/a-flac.flac -c4228df189aad9567a037727d0e763e4 *./tests/data/flac.vsynth.out.wav -stddev: 33.31 PSNR:65.87 bytes:1040384 +95e54b261530a1bcf6de6fe3b21dc5f6 *./tests/data/flac.vsynth.out.wav +stddev: 0.00 PSNR:99.99 bytes:1056768 4435d87463cd6c5407bd88cca241ca56 *./tests/data/a-wmav1.asf 106004 ./tests/data/a-wmav1.asf stddev:12251.50 PSNR:14.56 bytes:1056768 diff --git a/tests/libav.regression.ref b/tests/libav.regression.ref index 6c5c23690a..a42ecd1a0e 100644 --- a/tests/libav.regression.ref +++ b/tests/libav.regression.ref @@ -93,7 +93,7 @@ ae3a23a7ea13c92a2909445ca8144dcd *./tests/data/b-libav.aif ./tests/data/b-libav.voc CRC=0x49972c8c 9268c90bd2623a5ab3c2a1a751826f69 *./tests/data/b-libav.ogg 14210 ./tests/data/b-libav.ogg -./tests/data/b-libav.ogg CRC=0x6bcbb966 +./tests/data/b-libav.ogg CRC=0x37a143ea ce356ce2708cb6033ab5d762da93cfd4 *./tests/data/b-libav-yuv420p.yuv 304128 ./tests/data/b-libav-yuv420p.yuv ce356ce2708cb6033ab5d762da93cfd4 *./tests/data/b-libav-yuv422p.yuv diff --git a/tests/rotozoom.regression.ref b/tests/rotozoom.regression.ref index eaab2cc421..0f4b76a3a0 100644 --- a/tests/rotozoom.regression.ref +++ b/tests/rotozoom.regression.ref @@ -195,8 +195,8 @@ e48b800e2d9be6afcd430d4f08a34eb6 *./tests/data/adpcm_swf.rotozoom.out.wav stddev:934.30 PSNR:36.91 bytes:1056768 c3382f03ce2efb5d475240d288a33898 *./tests/data/a-flac.flac 353368 ./tests/data/a-flac.flac -c4228df189aad9567a037727d0e763e4 *./tests/data/flac.rotozoom.out.wav -stddev: 33.31 PSNR:65.87 bytes:1040384 +95e54b261530a1bcf6de6fe3b21dc5f6 *./tests/data/flac.rotozoom.out.wav +stddev: 0.00 PSNR:99.99 bytes:1056768 4435d87463cd6c5407bd88cca241ca56 *./tests/data/a-wmav1.asf 106004 ./tests/data/a-wmav1.asf stddev:12251.50 PSNR:14.56 bytes:1056768 |