gst_aac_parse_set_src_caps (aacparse, caps);
if (aacparse->header_type == aacparse->output_header_type)
gst_base_parse_set_passthrough (parse, TRUE);
- } else
+ } else {
return FALSE;
+ }
/* caps info overrides */
gst_structure_get_int (structure, "rate", &aacparse->sample_rate);
gst_structure_get_int (structure, "channels", &aacparse->channels);
} else {
- aacparse->sample_rate = 0;
- aacparse->channels = 0;
- aacparse->header_type = DSPAAC_HEADER_NOT_PARSED;
- gst_base_parse_set_passthrough (parse, FALSE);
+ const gchar *stream_format =
+ gst_structure_get_string (structure, "stream-format");
+
+ if (g_strcmp0 (stream_format, "raw") == 0) {
+ GST_ERROR_OBJECT (parse, "Need codec_data for raw AAC");
+ return FALSE;
+ } else {
+ aacparse->sample_rate = 0;
+ aacparse->channels = 0;
+ aacparse->header_type = DSPAAC_HEADER_NOT_PARSED;
+ gst_base_parse_set_passthrough (parse, FALSE);
+ }
}
return TRUE;