mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
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
1 changed files with 4 additions and 1 deletions
|
@ -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…
Reference in a new issue