mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-03 14:32:16 +02:00
avformat/aiffdec: only read codec tag when there is space in header
Signed-off-by: Peter Ross <pross@xvid.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
ce1e10aa24
commit
f1098eb97d
@ -116,10 +116,12 @@ static unsigned int get_aiff_header(AVFormatContext *s, int size,
|
|||||||
size -= 18;
|
size -= 18;
|
||||||
|
|
||||||
/* get codec id for AIFF-C */
|
/* get codec id for AIFF-C */
|
||||||
if (version == AIFF_C_VERSION1) {
|
if (version == AIFF_C_VERSION1 && size >= 4) {
|
||||||
codec->codec_tag = avio_rl32(pb);
|
codec->codec_tag = avio_rl32(pb);
|
||||||
codec->codec_id = ff_codec_get_id(ff_codec_aiff_tags, codec->codec_tag);
|
codec->codec_id = ff_codec_get_id(ff_codec_aiff_tags, codec->codec_tag);
|
||||||
size -= 4;
|
size -= 4;
|
||||||
|
} else {
|
||||||
|
version = AIFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (version != AIFF_C_VERSION1 || codec->codec_id == AV_CODEC_ID_PCM_S16BE) {
|
if (version != AIFF_C_VERSION1 || codec->codec_id == AV_CODEC_ID_PCM_S16BE) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user