Browse Source

mov: Compute max duration among the tracks with a timescale

Prevent an assert.
tags/n2.1
Luca Barbato 12 years ago
parent
commit
22de0f8369
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavformat/movenc.c

+ 1
- 1
libavformat/movenc.c View File

@@ -1640,7 +1640,7 @@ static int mov_write_mvhd_tag(AVIOContext *pb, MOVMuxContext *mov)
int version;

for (i = 0; i < mov->nb_streams; i++) {
if (mov->tracks[i].entry > 0) {
if (mov->tracks[i].entry > 0 && mov->tracks[i].timescale) {
max_track_len_temp = av_rescale_rnd(mov->tracks[i].track_duration,
MOV_TIMESCALE,
mov->tracks[i].timescale,


Loading…
Cancel
Save