Browse Source

electronicarts: check timebase, fix assertion failure

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.0
Michael Niedermayer 12 years ago
parent
commit
1831274ff1
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      libavformat/electronicarts.c

+ 4
- 0
libavformat/electronicarts.c View File

@@ -289,6 +289,10 @@ static int process_video_header_vp6(AVFormatContext *s)
avio_skip(pb, 4);
ea->time_base.den = 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;

return 1;


Loading…
Cancel
Save