diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2009-11-05 07:11:54 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2009-11-05 07:11:54 +0000 |
commit | 507330b9d32679df228df944ac4b515b29002d47 (patch) | |
tree | 0c34195b9d7d74f824e86d5a859cb2e1deba7bdf /libavformat/mov.c | |
parent | 87e76ae0bddc725f513bcd4797b10de6cf8bb69c (diff) | |
download | ffmpeg-507330b9d32679df228df944ac4b515b29002d47.tar.gz |
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
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r-- | libavformat/mov.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index 26f516bd50..dfe50c1cf5 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -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); |