Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: [email protected]
---
libavformat/electronicarts.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c
index e764bd9..baf5535 100644
--- a/libavformat/electronicarts.c
+++ b/libavformat/electronicarts.c
@@ -451,6 +451,12 @@ static int ea_read_header(AVFormatContext *s)
return AVERROR(EIO);
if (ea->video_codec) {
+ if (ea->time_base.num <= 0 ||
+ ea->time_base.den <= 0) {
+ av_log(s, AV_LOG_WARNING, "Video time base not set, skipping\n");
+ ea->video_codec = 0;
+ goto skip_video;
+ }
/* initialize the video decoder stream */
st = avformat_new_stream(s, NULL);
if (!st)
@@ -465,7 +471,7 @@ static int ea_read_header(AVFormatContext *s)
st->avg_frame_rate = (AVRational) { ea->time_base.den,
ea->time_base.num };
}
-
+skip_video:
if (ea->audio_codec) {
if (ea->num_channels <= 0) {
av_log(s, AV_LOG_WARNING,
--
1.8.3.2
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel