diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c index 27e8e0c261..9ecaa287bb 100644 --- a/libavformat/mxfdec.c +++ b/libavformat/mxfdec.c @@ -3896,7 +3896,7 @@ static int mxf_get_next_track_edit_unit(MXFContext *mxf, MXFTrack *track, int64_ a = -1; b = track->original_duration; while (b - 1 > a) { - m = (a + b) >> 1; + m = (a + (uint64_t)b) >> 1; if (mxf_edit_unit_absolute_offset(mxf, t, m, track->edit_rate, NULL, &offset, NULL, 0) < 0) return -1; if (offset < current_offset)