qtdemux: Avoid negative overflow on keyframe search
Do not overflow negatively when searching a previous "keyframe" on audio streams. Could cause infinite loops on backwards playback Fixes #607718
This commit is contained in:
parent
701c7d4b2a
commit
8a80fdaad1
@ -1932,7 +1932,10 @@ gst_qtdemux_seek_to_previous_keyframe (GstQTDemux * qtdemux)
|
||||
k_index = gst_qtdemux_find_keyframe (qtdemux, ref_str,
|
||||
ref_str->from_sample - 1);
|
||||
} else {
|
||||
k_index = ref_str->from_sample - 10;
|
||||
if (ref_str->from_sample >= 10)
|
||||
k_index = ref_str->from_sample - 10;
|
||||
else
|
||||
k_index = 0;
|
||||
}
|
||||
|
||||
/* get current segment for that stream */
|
||||
|
Loading…
x
Reference in New Issue
Block a user