Skip to content
Snippets Groups Projects
Commit 55c7e4ad authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

broken avi / div by zero fix

Originally committed as revision 3761 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 15bc38e5
No related branches found
No related tags found
No related merge requests found
...@@ -252,6 +252,8 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap) ...@@ -252,6 +252,8 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
get_le32(pb); /* initial frame */ get_le32(pb); /* initial frame */
ast->scale = get_le32(pb); /* scale */ ast->scale = get_le32(pb); /* scale */
ast->rate = get_le32(pb); 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); av_set_pts_info(st, 64, ast->scale, ast->rate);
ast->start= get_le32(pb); /* start */ ast->start= get_le32(pb); /* start */
length = get_le32(pb); /* length, in samples or bytes */ length = get_le32(pb); /* length, in samples or bytes */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment