Commit 8a80fdaa authored by Roland Krikava's avatar Roland Krikava Committed by Thiago Santos
Browse files

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
parent 701c7d4b
......@@ -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 */
......
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