mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 04:26:14 +00:00
aacparse: minor cleanups
This commit is contained in:
parent
31d387f7b5
commit
3e50f0a3c9
1 changed files with 5 additions and 6 deletions
|
@ -243,7 +243,6 @@ gst_aacparse_set_src_caps (GstAacParse * aacparse, GstCaps * sink_caps)
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (aacparse, "setting src caps: %" GST_PTR_FORMAT, src_caps);
|
GST_DEBUG_OBJECT (aacparse, "setting src caps: %" GST_PTR_FORMAT, src_caps);
|
||||||
|
|
||||||
gst_pad_use_fixed_caps (GST_BASE_PARSE (aacparse)->srcpad);
|
|
||||||
res = gst_pad_set_caps (GST_BASE_PARSE (aacparse)->srcpad, src_caps);
|
res = gst_pad_set_caps (GST_BASE_PARSE (aacparse)->srcpad, src_caps);
|
||||||
gst_caps_unref (src_caps);
|
gst_caps_unref (src_caps);
|
||||||
return res;
|
return res;
|
||||||
|
@ -265,6 +264,7 @@ gst_aacparse_sink_setcaps (GstBaseParse * parse, GstCaps * caps)
|
||||||
GstAacParse *aacparse;
|
GstAacParse *aacparse;
|
||||||
GstStructure *structure;
|
GstStructure *structure;
|
||||||
gchar *caps_str;
|
gchar *caps_str;
|
||||||
|
const GValue *value;
|
||||||
|
|
||||||
aacparse = GST_AACPARSE (parse);
|
aacparse = GST_AACPARSE (parse);
|
||||||
structure = gst_caps_get_structure (caps, 0);
|
structure = gst_caps_get_structure (caps, 0);
|
||||||
|
@ -276,12 +276,11 @@ gst_aacparse_sink_setcaps (GstBaseParse * parse, GstCaps * caps)
|
||||||
/* This is needed at least in case of RTP
|
/* This is needed at least in case of RTP
|
||||||
* Parses the codec_data information to get ObjectType,
|
* Parses the codec_data information to get ObjectType,
|
||||||
* number of channels and samplerate */
|
* number of channels and samplerate */
|
||||||
if (gst_structure_has_field (structure, "codec_data")) {
|
value = gst_structure_get_value (structure, "codec_data");
|
||||||
|
if (value) {
|
||||||
|
GstBuffer *buf = gst_value_get_buffer (value);
|
||||||
|
|
||||||
const GValue *value = gst_structure_get_value (structure, "codec_data");
|
if (buf) {
|
||||||
|
|
||||||
if (value) {
|
|
||||||
GstBuffer *buf = gst_value_get_buffer (value);
|
|
||||||
const guint8 *buffer = GST_BUFFER_DATA (buf);
|
const guint8 *buffer = GST_BUFFER_DATA (buf);
|
||||||
guint sr_idx;
|
guint sr_idx;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue