提交 507330b9 编写于 作者: B Baptiste Coudurier

warn if stream timescale is not set and set it to 1 to avoid FPE

Originally committed as revision 20456 to svn://svn.ffmpeg.org/ffmpeg/trunk
上级 87e76ae0
......@@ -1572,8 +1572,12 @@ static int mov_read_trak(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
return 0;
}
if (!sc->time_scale)
if (!sc->time_scale) {
av_log(c->fc, AV_LOG_WARNING, "stream %d, timescale not set\n", st->index);
sc->time_scale = c->time_scale;
if (!sc->time_scale)
sc->time_scale = 1;
}
av_set_pts_info(st, 64, 1, sc->time_scale);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册