Commit 6cdbf406 authored by Dave Craig's avatar Dave Craig Committed by Sebastian Dröge
Browse files

aacparse: Handle gst_pad_get_current_caps() returning NULL gracefully

This can happen when the pipeline is currently shutting down.
parent a5691af3
......@@ -1016,6 +1016,10 @@ gst_aac_parse_get_audio_profile_object_type (GstAacParse * aacparse)
guint8 ret;
srccaps = gst_pad_get_current_caps (GST_BASE_PARSE_SRC_PAD (aacparse));
if (G_UNLIKELY (srccaps == NULL)) {
return G_MAXUINT8;
srcstruct = gst_caps_get_structure (srccaps, 0);
profile = gst_structure_get_string (srcstruct, "profile");
if (G_UNLIKELY (profile == NULL)) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment