Mercurial > libavformat.hg
changeset 3209:19fe207a2fa4 libavformat
Do not call update_initial_durations if pkt->duration is 0.
Fixes and assertion crash when playing amv files, e.g.
http://samples.mplayerhq.hu/amv/Shakira - Hips Don't Lie.amv
author | reimar |
---|---|
date | Sun, 13 Apr 2008 08:55:02 +0000 |
parents | 84d1f4cf985e |
children | 7adc8fcec695 |
files | utils.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/utils.c Sat Apr 12 16:22:13 2008 +0000 +++ b/utils.c Sun Apr 13 08:55:02 2008 +0000 @@ -668,7 +668,7 @@ if (den && num) { pkt->duration = av_rescale(1, num * (int64_t)st->time_base.den, den * (int64_t)st->time_base.num); - if(st->cur_dts == 0) + if(st->cur_dts == 0 && pkt->duration != 0) update_initial_durations(s, st, pkt); } }