Mercurial > libavformat.hg
changeset 621:d3baee10d526 libavformat
broken avi / div by zero fix
author | michael |
---|---|
date | Sun, 19 Dec 2004 02:55:40 +0000 |
parents | 7dbdbe073bcd |
children | d4f80b13d981 |
files | avidec.c |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/avidec.c Sun Dec 19 01:23:22 2004 +0000 +++ b/avidec.c Sun Dec 19 02:55:40 2004 +0000 @@ -252,6 +252,8 @@ 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 */