mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 03:00:35 +00:00
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.
This commit is contained in:
parent
19121249bd
commit
58816039c2
1 changed files with 9 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue