mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 09:10:36 +00:00
aacparse: only require two frames in a row when we do not have sync
This avoids a single bit error dropping two frames unnecessarily. The two consecutive frames check is still required when we don't have sync. https://bugzilla.gnome.org/show_bug.cgi?id=657080
This commit is contained in:
parent
bd604175c5
commit
f3fc3e1f69
1 changed files with 6 additions and 2 deletions
|
@ -340,8 +340,12 @@ gst_aac_parse_check_adts_frame (GstAacParse * aacparse,
|
||||||
if ((data[0] == 0xff) && ((data[1] & 0xf6) == 0xf0)) {
|
if ((data[0] == 0xff) && ((data[1] & 0xf6) == 0xf0)) {
|
||||||
*framesize = gst_aac_parse_adts_get_frame_len (data);
|
*framesize = gst_aac_parse_adts_get_frame_len (data);
|
||||||
|
|
||||||
/* In EOS mode this is enough. No need to examine the data further */
|
/* In EOS mode this is enough. No need to examine the data further.
|
||||||
if (drain) {
|
We also relax the check when we have sync, on the assumption that
|
||||||
|
if we're not looking at random data, we have a much higher chance
|
||||||
|
to get the correct sync, and this avoids losing two frames when
|
||||||
|
a single bit corruption happens. */
|
||||||
|
if (drain || !GST_BASE_PARSE_LOST_SYNC (aacparse)) {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue