mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
flacparse: rework gst_flac_parse_frame_is_valid()
drop unnecessary nesting looking for end of frame
This commit is contained in:
parent
90b62be301
commit
276fcc5916
1 changed files with 25 additions and 23 deletions
|
@ -676,7 +676,10 @@ gst_flac_parse_frame_is_valid (GstFlacParse * flacparse,
|
|||
remaining = map.size;
|
||||
|
||||
for (i = search_start; i < search_end; i++, remaining--) {
|
||||
if ((GST_READ_UINT16_BE (map.data + i) & 0xfffe) == 0xfff8) {
|
||||
|
||||
if ((GST_READ_UINT16_BE (map.data + i) & 0xfffe) != 0xfff8)
|
||||
continue;
|
||||
|
||||
GST_LOG_OBJECT (flacparse, "possible frame end at offset %d", i);
|
||||
suspect_end = FALSE;
|
||||
header_ret =
|
||||
|
@ -703,7 +706,6 @@ gst_flac_parse_frame_is_valid (GstFlacParse * flacparse,
|
|||
goto need_more;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* For the last frame output everything to the end */
|
||||
if (G_UNLIKELY (GST_BASE_PARSE_DRAINING (flacparse))) {
|
||||
|
|
Loading…
Reference in a new issue