mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-10 03:19:40 +00:00
mp3parse: Allow more bits to change in headers during resynch
Be more lenient about what we accept as changing bits in a header - basically, only require that the mp3 sync marker is present, for the mpeg version, layer and samplerate. Fixes: #581464
This commit is contained in:
parent
88db06cb65
commit
85a88a0a64
1 changed files with 5 additions and 3 deletions
|
@ -1273,13 +1273,15 @@ gst_mp3parse_chain (GstPad * pad, GstBuffer * buf)
|
|||
/* mask the bits which are allowed to differ between frames */
|
||||
#define HDRMASK ~((0xF << 12) /* bitrate */ | \
|
||||
(0x1 << 9) /* padding */ | \
|
||||
(0x3 << 4)) /* mode extension */
|
||||
(0xf << 4) /* mode|mode extension */ | \
|
||||
(0xf)) /* copyright|emphasis */
|
||||
|
||||
/* require 2 matching headers in a row */
|
||||
if ((header2 & HDRMASK) != (header & HDRMASK)) {
|
||||
GST_DEBUG_OBJECT (mp3parse, "next header doesn't match "
|
||||
"(header=%08X, header2=%08X, bpf=%d)",
|
||||
(unsigned int) header, (unsigned int) header2, bpf);
|
||||
"(header=%08X (%08X), header2=%08X (%08X), bpf=%d)",
|
||||
(guint) header, (guint) header & HDRMASK, (guint) header2,
|
||||
(guint) header2 & HDRMASK, bpf);
|
||||
/* This frame is invalid. Start looking for a valid frame at the
|
||||
* next position in the stream */
|
||||
mp3parse->resyncing = TRUE;
|
||||
|
|
Loading…
Reference in a new issue