Commit 93a49b17 authored by michael's avatar michael

Check sub_packet_size against 0 to avoid div by zero later.

Fixes issue473


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@15739 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 37309e02
......@@ -138,6 +138,11 @@ static int rm_read_audio_stream_info(AVFormatContext *s, AVStream *st,
return -1;
}
if(sub_packet_size <= 0){
av_log(s, AV_LOG_ERROR, "sub_packet_size is invalid\n");
return -1;
}
if (!strcmp(buf, "cook")) st->codec->codec_id = CODEC_ID_COOK;
else if (!strcmp(buf, "sipr")) st->codec->codec_id = CODEC_ID_SIPR;
else st->codec->codec_id = CODEC_ID_ATRAC3;
......
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