Mercurial > libavformat.hg
changeset 5345:4f2be9042fd6 libavformat
warn if stream timescale is not set and set it to 1 to avoid FPE
author | bcoudurier |
---|---|
date | Thu, 05 Nov 2009 07:11:54 +0000 |
parents | b596cf9ab248 |
children | e226b1d6a6ee |
files | mov.c |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mov.c Thu Nov 05 02:04:21 2009 +0000 +++ b/mov.c Thu Nov 05 07:11:54 2009 +0000 @@ -1572,8 +1572,12 @@ 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);