diff options
-rw-r--r-- | src/demuxers/demux_qt.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/demuxers/demux_qt.c b/src/demuxers/demux_qt.c index eadf32da8..adff9f755 100644 --- a/src/demuxers/demux_qt.c +++ b/src/demuxers/demux_qt.c @@ -653,7 +653,7 @@ static qt_info *create_qt_info(void) { info->creation_time = 0; info->modification_time = 0; - info->timescale = 0; + info->timescale = 1; info->duration = 0; info->trak_count = 0; @@ -784,6 +784,9 @@ static void parse_mvhd_atom(qt_info *info, unsigned char *mvhd_atom) { info->timescale = _X_BE_32(&mvhd_atom[0x14]); info->duration = _X_BE_32(&mvhd_atom[0x18]); + if (info->timescale == 0) + info->timescale = 1; + debug_atom_load(" qt: timescale = %d, duration = %d (%d seconds)\n", info->timescale, info->duration, info->duration / info->timescale); @@ -963,7 +966,7 @@ static qt_error parse_trak_atom (qt_trak *trak, trak->frames = NULL; trak->frame_count = 0; trak->current_frame = 0; - trak->timescale = 0; + trak->timescale = 1; trak->flags = 0; trak->object_type_id = 0; trak->decoder_config = NULL; @@ -1057,6 +1060,8 @@ static qt_error parse_trak_atom (qt_trak *trak, } } } + if (trak->timescale == 0) + trak->timescale = 1; atom = atoms[5]; /* STSD_ATOM */ atomsize = sizes[5]; |