broken avi / div by zero fix

Originally committed as revision 3761 to svn://svn.ffmpeg.org/ffmpeg/trunk
pull/126/head
Michael Niedermayer 20 years ago
parent 15bc38e57c
commit 55c7e4ad5d
  1. 2
      libavformat/avidec.c

@ -252,6 +252,8 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
get_le32(pb); /* initial frame */
ast->scale = get_le32(pb); /* scale */
ast->rate = get_le32(pb);
if(!ast->rate)
ast->rate= 1; //wrong but better then 1/0
av_set_pts_info(st, 64, ast->scale, ast->rate);
ast->start= get_le32(pb); /* start */
length = get_le32(pb); /* length, in samples or bytes */

Loading…
Cancel
Save