mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-26 10:10:32 +00:00
Merge commit '02f5d72a0519bcbe8f6958fab6dd998fc8ccda6b' into 0.11
Conflicts: ext/mad/gstmad.c
This commit is contained in:
commit
42d53650fa
2 changed files with 20 additions and 0 deletions
|
@ -29,6 +29,9 @@ then
|
||||||
ln -s ../../common/hooks/pre-commit.hook .git/hooks/pre-commit
|
ln -s ../../common/hooks/pre-commit.hook .git/hooks/pre-commit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# GNU gettext automake support doesn't get along with git.
|
||||||
|
# https://bugzilla.gnome.org/show_bug.cgi?id=661128
|
||||||
|
touch -t 200001010000 po/$package-0.10.pot
|
||||||
|
|
||||||
CONFIGURE_DEF_OPT='--enable-maintainer-mode --enable-gtk-doc'
|
CONFIGURE_DEF_OPT='--enable-maintainer-mode --enable-gtk-doc'
|
||||||
|
|
||||||
|
|
|
@ -304,6 +304,7 @@ gst_mad_parse (GstAudioDecoder * dec, GstAdapter * adapter,
|
||||||
"using fallback buffer of size %u",
|
"using fallback buffer of size %u",
|
||||||
MAD_BUFFER_GUARD, av + MAD_BUFFER_GUARD);
|
MAD_BUFFER_GUARD, av + MAD_BUFFER_GUARD);
|
||||||
data = guard;
|
data = guard;
|
||||||
|
av = av + MAD_BUFFER_GUARD;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* we basically let mad library do parsing,
|
/* we basically let mad library do parsing,
|
||||||
|
@ -338,6 +339,22 @@ gst_mad_parse (GstAudioDecoder * dec, GstAdapter * adapter,
|
||||||
|
|
||||||
GST_LOG_OBJECT (mad, "decoding the header now");
|
GST_LOG_OBJECT (mad, "decoding the header now");
|
||||||
if (mad_header_decode (&mad->frame.header, &mad->stream) == -1) {
|
if (mad_header_decode (&mad->frame.header, &mad->stream) == -1) {
|
||||||
|
/* HACK it seems mad reports wrong error when it is trying to determine
|
||||||
|
* free bitrate and scanning for next header */
|
||||||
|
if (mad->stream.error == MAD_ERROR_LOSTSYNC) {
|
||||||
|
const guint8 *ptr = mad->stream.this_frame;
|
||||||
|
guint32 header;
|
||||||
|
|
||||||
|
if (ptr >= data && ptr < data + av) {
|
||||||
|
header = GST_READ_UINT32_BE (ptr);
|
||||||
|
/* looks like possible freeform header with not much data */
|
||||||
|
if (((header & 0xFFE00000) == 0xFFE00000) &&
|
||||||
|
(((header >> 12) & 0xF) == 0x0) && (av < 4096)) {
|
||||||
|
GST_DEBUG_OBJECT (mad, "overriding freeform LOST_SYNC to BUFLEN");
|
||||||
|
mad->stream.error = MAD_ERROR_BUFLEN;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
if (mad->stream.error == MAD_ERROR_BUFLEN) {
|
if (mad->stream.error == MAD_ERROR_BUFLEN) {
|
||||||
GST_LOG_OBJECT (mad,
|
GST_LOG_OBJECT (mad,
|
||||||
"not enough data in tempbuffer (%d), breaking to get more", size);
|
"not enough data in tempbuffer (%d), breaking to get more", size);
|
||||||
|
|
Loading…
Reference in a new issue