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);
gst_caps_unref (src_caps);
return res;
GstAacParse *aacparse;
GstStructure *structure;
gchar *caps_str;
+ const GValue *value;
aacparse = GST_AACPARSE (parse);
structure = gst_caps_get_structure (caps, 0);
/* This is needed at least in case of RTP
* Parses the codec_data information to get ObjectType,
* 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 (value) {
- GstBuffer *buf = gst_value_get_buffer (value);
+ if (buf) {
const guint8 *buffer = GST_BUFFER_DATA (buf);
guint sr_idx;