Commit 9641041b authored by michael's avatar michael

Make our flac decoder decode all the data at EOF.

Fixes issue524


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@14223 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent a714b117
...@@ -624,7 +624,7 @@ static int flac_decode_frame(AVCodecContext *avctx, ...@@ -624,7 +624,7 @@ static int flac_decode_frame(AVCodecContext *avctx,
buf_size += s->bitstream_size; buf_size += s->bitstream_size;
s->bitstream_size= buf_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"); // printf("wanna more data ...\n");
return input_buf_size; return input_buf_size;
} }
...@@ -773,6 +773,7 @@ AVCodec flac_decoder = { ...@@ -773,6 +773,7 @@ AVCodec flac_decoder = {
NULL, NULL,
flac_decode_close, flac_decode_close,
flac_decode_frame, flac_decode_frame,
CODEC_CAP_DELAY,
.flush= flac_flush, .flush= flac_flush,
.long_name= NULL_IF_CONFIG_SMALL("FLAC (Free Lossless Audio Codec)"), .long_name= NULL_IF_CONFIG_SMALL("FLAC (Free Lossless Audio Codec)"),
}; };
...@@ -195,8 +195,8 @@ e48b800e2d9be6afcd430d4f08a34eb6 *./tests/data/adpcm_swf.vsynth.out.wav ...@@ -195,8 +195,8 @@ e48b800e2d9be6afcd430d4f08a34eb6 *./tests/data/adpcm_swf.vsynth.out.wav
stddev:934.30 PSNR:36.91 bytes:1056768 stddev:934.30 PSNR:36.91 bytes:1056768
c3382f03ce2efb5d475240d288a33898 *./tests/data/a-flac.flac c3382f03ce2efb5d475240d288a33898 *./tests/data/a-flac.flac
353368 ./tests/data/a-flac.flac 353368 ./tests/data/a-flac.flac
c4228df189aad9567a037727d0e763e4 *./tests/data/flac.vsynth.out.wav 95e54b261530a1bcf6de6fe3b21dc5f6 *./tests/data/flac.vsynth.out.wav
stddev: 33.31 PSNR:65.87 bytes:1040384 stddev: 0.00 PSNR:99.99 bytes:1056768
4435d87463cd6c5407bd88cca241ca56 *./tests/data/a-wmav1.asf 4435d87463cd6c5407bd88cca241ca56 *./tests/data/a-wmav1.asf
106004 ./tests/data/a-wmav1.asf 106004 ./tests/data/a-wmav1.asf
stddev:12251.50 PSNR:14.56 bytes:1056768 stddev:12251.50 PSNR:14.56 bytes:1056768
......
...@@ -93,7 +93,7 @@ ae3a23a7ea13c92a2909445ca8144dcd *./tests/data/b-libav.aif ...@@ -93,7 +93,7 @@ ae3a23a7ea13c92a2909445ca8144dcd *./tests/data/b-libav.aif
./tests/data/b-libav.voc CRC=0x49972c8c ./tests/data/b-libav.voc CRC=0x49972c8c
9268c90bd2623a5ab3c2a1a751826f69 *./tests/data/b-libav.ogg 9268c90bd2623a5ab3c2a1a751826f69 *./tests/data/b-libav.ogg
14210 ./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 ce356ce2708cb6033ab5d762da93cfd4 *./tests/data/b-libav-yuv420p.yuv
304128 ./tests/data/b-libav-yuv420p.yuv 304128 ./tests/data/b-libav-yuv420p.yuv
ce356ce2708cb6033ab5d762da93cfd4 *./tests/data/b-libav-yuv422p.yuv ce356ce2708cb6033ab5d762da93cfd4 *./tests/data/b-libav-yuv422p.yuv
......
...@@ -195,8 +195,8 @@ e48b800e2d9be6afcd430d4f08a34eb6 *./tests/data/adpcm_swf.rotozoom.out.wav ...@@ -195,8 +195,8 @@ e48b800e2d9be6afcd430d4f08a34eb6 *./tests/data/adpcm_swf.rotozoom.out.wav
stddev:934.30 PSNR:36.91 bytes:1056768 stddev:934.30 PSNR:36.91 bytes:1056768
c3382f03ce2efb5d475240d288a33898 *./tests/data/a-flac.flac c3382f03ce2efb5d475240d288a33898 *./tests/data/a-flac.flac
353368 ./tests/data/a-flac.flac 353368 ./tests/data/a-flac.flac
c4228df189aad9567a037727d0e763e4 *./tests/data/flac.rotozoom.out.wav 95e54b261530a1bcf6de6fe3b21dc5f6 *./tests/data/flac.rotozoom.out.wav
stddev: 33.31 PSNR:65.87 bytes:1040384 stddev: 0.00 PSNR:99.99 bytes:1056768
4435d87463cd6c5407bd88cca241ca56 *./tests/data/a-wmav1.asf 4435d87463cd6c5407bd88cca241ca56 *./tests/data/a-wmav1.asf
106004 ./tests/data/a-wmav1.asf 106004 ./tests/data/a-wmav1.asf
stddev:12251.50 PSNR:14.56 bytes:1056768 stddev:12251.50 PSNR:14.56 bytes:1056768
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment