[FFmpeg-cvslog] Do not limit blocksize when reading PCM from aiff.
Carl Eugen Hoyos
git at videolan.org
Tue Jun 10 00:39:04 CEST 2014
ffmpeg | branch: release/2.2 | Carl Eugen Hoyos <cehoyos at ag.or.at> | Tue Jun 3 00:54:46 2014 +0200| [d1b62a9a07719480f6d306420f1abac3fc07cfa2] | committer: Carl Eugen Hoyos
Do not limit blocksize when reading PCM from aiff.
Fixes ticket #3695.
(cherry picked from commit 763e714442e07f6430b003c8a9f4b62deaa7b3a5)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d1b62a9a07719480f6d306420f1abac3fc07cfa2
---
libavformat/aiffdec.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c
index 81bcc64..7accec4 100644
--- a/libavformat/aiffdec.c
+++ b/libavformat/aiffdec.c
@@ -344,10 +344,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)
More information about the ffmpeg-cvslog
mailing list