1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Avoid img_segment_size == 0 in mtv demuxer.

Fixes ticket #3011.
This commit is contained in:
Carl Eugen Hoyos 2013-09-29 20:09:56 +02:00
parent 5c7d86cbde
commit e34ba4723e

View File

@ -105,8 +105,8 @@ static int mtv_read_header(AVFormatContext *s)
mtv->img_height=mtv->img_segment_size / (mtv->img_bpp>>3) mtv->img_height=mtv->img_segment_size / (mtv->img_bpp>>3)
/ mtv->img_width; / mtv->img_width;
} }
if(!mtv->img_height || !mtv->img_width){ if(!mtv->img_height || !mtv->img_width || !mtv->img_segment_size){
av_log(s, AV_LOG_ERROR, "width or height is invalid and I cannot calculate them from other information\n"); av_log(s, AV_LOG_ERROR, "width or height or segment_size is invalid and I cannot calculate them from other information\n");
return AVERROR(EINVAL); return AVERROR(EINVAL);
} }