Commit 26338f57 authored by reimar's avatar reimar

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


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@12797 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 455d75ff
...@@ -668,7 +668,7 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st, ...@@ -668,7 +668,7 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st,
if (den && num) { if (den && num) {
pkt->duration = av_rescale(1, num * (int64_t)st->time_base.den, den * (int64_t)st->time_base.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); update_initial_durations(s, st, pkt);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment