提交 ee794d1e 编写于 作者: R Reimar Döffinger

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

Originally committed as revision 12797 to svn://svn.ffmpeg.org/ffmpeg/trunk
上级 ba0dabbf
......@@ -668,7 +668,7 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st,
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);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册