Commit 031285de authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '72f80161'

* commit '72f80161':
  movenc: Adjust edit lists to trim out parts of tracks with negative pts

Conflicts:
	libavformat/movenc.c

See: 66b45d8f
See: 14fd34d7Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 5afe1233 72f80161
......@@ -2220,8 +2220,12 @@ static int mov_write_edts_tag(AVIOContext *pb, MOVTrack *track)
}
avio_wb32(pb, 0x00010000);
} else {
/* Avoid accidentally ending up with start_ct = -1 which has got a
* special meaning. Normally start_ct should end up positive or zero
* here, but use FFMIN in case dts is a a small positive integer
* rounded to 0 when represented in MOV_TIMESCALE units. */
av_assert0(av_rescale_rnd(track->cluster[0].dts, MOV_TIMESCALE, track->timescale, AV_ROUND_DOWN) <= 0);
start_ct = -FFMIN(track->cluster[0].dts, 0); //FFMIN needed due to rounding
start_ct = -FFMIN(track->cluster[0].dts, 0);
duration += delay;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment