Commit 744d4dfd authored by conrad's avatar conrad

mkvdec: Avoid divide-by-zero crash on invalid real audio tracks

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@21129 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 78fd4671
......@@ -1634,9 +1634,10 @@ static int matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data,
if (res == 0) {
for (n = 0; n < laces; n++) {
if (st->codec->codec_id == CODEC_ID_RA_288 ||
st->codec->codec_id == CODEC_ID_COOK ||
st->codec->codec_id == CODEC_ID_ATRAC3) {
if ((st->codec->codec_id == CODEC_ID_RA_288 ||
st->codec->codec_id == CODEC_ID_COOK ||
st->codec->codec_id == CODEC_ID_ATRAC3) &&
st->codec->block_align && track->audio.sub_packet_size) {
int a = st->codec->block_align;
int sps = track->audio.sub_packet_size;
int cfs = track->audio.coded_framesize;
......
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