You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avformat/mov: Fix ctts_index calculation
An index should never be equal to the count. Hence we must make sure *ctts_index < ctts_count. Reviewed-by: Sasi Inguva <isasi@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
committed by
Michael Niedermayer
parent
909e00ae81
commit
dd5208aaf5
@@ -3132,7 +3132,7 @@ static int find_prev_closest_index(AVStream *st,
|
||||
}
|
||||
}
|
||||
|
||||
while (*index >= 0 && (*ctts_index) >= 0) {
|
||||
while (*index >= 0 && (*ctts_index) >= 0 && (*ctts_index) < ctts_count) {
|
||||
// Find a "key frame" with PTS <= timestamp_pts (So that we can decode B-frames correctly).
|
||||
// No need to add dts_shift to the timestamp here becase timestamp_pts has already been
|
||||
// compensated by dts_shift above.
|
||||
|
Reference in New Issue
Block a user