diff --git a/libavformat/mov.c b/libavformat/mov.c index a8c78b27c56d868851a93c457e272285f9a923bd..b584c0da42bfea8af6d4c6f01a4b34cc28c58851 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -2254,6 +2254,9 @@ static int mov_read_trex(MOVContext *c, AVIOContext *pb, MOVAtom atom) trex = av_realloc(c->trex_data, (c->trex_count+1)*sizeof(*c->trex_data)); if (!trex) return AVERROR(ENOMEM); + + c->fc->duration = AV_NOPTS_VALUE; // the duration from mvhd is not representing the whole file when fragments are used. + c->trex_data = trex; trex = &c->trex_data[c->trex_count++]; avio_r8(pb); /* version */