aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2014-06-03 00:54:46 +0200
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2014-06-10 00:09:50 +0200
commitbdba204bd07356100b00bd4afac46615d562634f (patch)
tree9042d51b0805ab9c40ff2706bfbe8668ef16edd1
parentbe4d4a61b5346bec2ca9ad9aa6afa54b4bf58621 (diff)
downloadffmpeg-bdba204bd07356100b00bd4afac46615d562634f.tar.gz
Do not limit blocksize when reading PCM from aiff.
Fixes ticket #3695. (cherry picked from commit 763e714442e07f6430b003c8a9f4b62deaa7b3a5)
-rw-r--r--libavformat/aiffdec.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c
index a0b6e71c47..3da0d95b13 100644
--- a/libavformat/aiffdec.c
+++ b/libavformat/aiffdec.c
@@ -345,10 +345,16 @@ static int aiff_read_packet(AVFormatContext *s,
return AVERROR_EOF;
/* Now for that packet */
- if (st->codec->block_align >= 17) // GSM, QCLP, IMA4
+ switch (st->codec->codec_id) {
+ case AV_CODEC_ID_ADPCM_IMA_QT:
+ case AV_CODEC_ID_GSM:
+ case AV_CODEC_ID_QDM2:
+ case AV_CODEC_ID_QCELP:
size = st->codec->block_align;
- else
+ break;
+ default:
size = (MAX_SIZE / st->codec->block_align) * st->codec->block_align;
+ }
size = FFMIN(max_size, size);
res = av_get_packet(s->pb, pkt, size);
if (res < 0)