Commit 1831274f authored by Michael Niedermayer's avatar Michael Niedermayer

electronicarts: check timebase, fix assertion failure

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent a56d963f
...@@ -289,6 +289,10 @@ static int process_video_header_vp6(AVFormatContext *s) ...@@ -289,6 +289,10 @@ static int process_video_header_vp6(AVFormatContext *s)
avio_skip(pb, 4); avio_skip(pb, 4);
ea->time_base.den = avio_rl32(pb); ea->time_base.den = avio_rl32(pb);
ea->time_base.num = avio_rl32(pb); ea->time_base.num = avio_rl32(pb);
if (ea->time_base.den <= 0 || ea->time_base.num <= 0) {
av_log(s, AV_LOG_ERROR, "Timebase is invalid\n");
return AVERROR_INVALIDDATA;
}
ea->video_codec = AV_CODEC_ID_VP6; ea->video_codec = AV_CODEC_ID_VP6;
return 1; return 1;
......
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