mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-09-16 17:10:35 +00:00
Log aac details found in codec_data.
This commit is contained in:
parent
93df7379e4
commit
2af1d512c4
2 changed files with 15 additions and 0 deletions
|
@ -317,11 +317,23 @@ gst_faad_setcaps (GstPad * pad, GstCaps * caps)
|
||||||
if (csize < 2)
|
if (csize < 2)
|
||||||
goto wrong_length;
|
goto wrong_length;
|
||||||
|
|
||||||
|
GST_DEBUG ("codec_data: object_type=%d, sample_rate=%d, channels=%d",
|
||||||
|
((cdata[0] & 0xf8) >> 3),
|
||||||
|
(((cdata[0] & 0x07) << 1) | ((cdata[1] & 0x80) >> 7)),
|
||||||
|
((cdata[1] & 0x78) >> 3));
|
||||||
|
|
||||||
/* someone forgot that char can be unsigned when writing the API */
|
/* someone forgot that char can be unsigned when writing the API */
|
||||||
if ((gint8) faacDecInit2 (faad->handle, cdata, csize, &samplerate,
|
if ((gint8) faacDecInit2 (faad->handle, cdata, csize, &samplerate,
|
||||||
&channels) < 0)
|
&channels) < 0)
|
||||||
goto init_failed;
|
goto init_failed;
|
||||||
|
|
||||||
|
if (channels != ((cdata[1] & 0x78) >> 3)) {
|
||||||
|
/* https://bugs.launchpad.net/ubuntu/+source/faad2/+bug/290259 */
|
||||||
|
GST_WARNING_OBJECT (faad,
|
||||||
|
"buggy faad version, wrong nr of channels %d instead of %d", channels,
|
||||||
|
((cdata[1] & 0x78) >> 3));
|
||||||
|
}
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (faad, "codec_data init: channels=%u, rate=%u", channels,
|
GST_DEBUG_OBJECT (faad, "codec_data init: channels=%u, rate=%u", channels,
|
||||||
samplerate);
|
samplerate);
|
||||||
|
|
||||||
|
|
|
@ -272,6 +272,9 @@ gst_aacparse_sink_setcaps (GstBaseParse * parse, GstCaps * caps)
|
||||||
aacparse->channels = (buffer[1] & 0x78) >> 3;
|
aacparse->channels = (buffer[1] & 0x78) >> 3;
|
||||||
aacparse->header_type = DSPAAC_HEADER_NONE;
|
aacparse->header_type = DSPAAC_HEADER_NONE;
|
||||||
aacparse->mpegversion = 4;
|
aacparse->mpegversion = 4;
|
||||||
|
|
||||||
|
GST_DEBUG ("codec_data: object_type=%d, sample_rate=%d, channels=%d",
|
||||||
|
aacparse->object_type, aacparse->sample_rate, aacparse->channels);
|
||||||
} else
|
} else
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue