Commit 20fa3fb9 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/movenc: assert that get_cluster_duration() value is valid

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 1b872de8
...@@ -614,7 +614,12 @@ static int get_cluster_duration(MOVTrack *track, int cluster_idx) ...@@ -614,7 +614,12 @@ static int get_cluster_duration(MOVTrack *track, int cluster_idx)
else else
next_dts = track->cluster[cluster_idx + 1].dts; next_dts = track->cluster[cluster_idx + 1].dts;
return next_dts - track->cluster[cluster_idx].dts; next_dts -= track->cluster[cluster_idx].dts;
av_assert0(next_dts >= 0);
av_assert0(next_dts <= INT_MAX);
return next_dts;
} }
static int get_samples_per_packet(MOVTrack *track) static int get_samples_per_packet(MOVTrack *track)
......
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