Commit 58816039 authored by Mark Nauwelaerts's avatar Mark Nauwelaerts
Browse files

flacparse: avoid indefinite extended search for frame end if possible

... which is particularly useful if locked on to the wrong frame start
and/or corrupt frame being crc checked.
parent 19121249
......@@ -691,6 +691,15 @@ gst_flac_parse_frame_is_valid (GstFlacParse * flacparse,
}
}
/* so we searched to expected end and found nothing,
* give up on this frame (start) */
if (flacparse->max_framesize && i > 2 * flacparse->max_framesize) {
GST_LOG_OBJECT (flacparse,
"could not determine valid frame end, discarding frame (start)");
*ret = 1;
return FALSE;
}
need_more:
max = flacparse->max_framesize + 16;
if (max == 16)
......
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