summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Craig <dcraig@brightsign.biz>2015-12-16 10:54:17 +0000
committerTim-Philipp Müller <tim@centricular.com>2016-04-06 11:22:30 +0100
commit55b7ea9779f06ebf6977a39965f9624975beaf63 (patch)
tree40c59989fc89168b279bce40a1b3edd43b265a9b
parent20da3aec822a19a84e33231d6ccddb6665a73ea5 (diff)
downloadgstreamer-plugins-good-55b7ea9779f06ebf6977a39965f9624975beaf63.tar.gz
aacparse: Handle gst_pad_get_current_caps() returning NULL gracefully
This can happen when the pipeline is currently shutting down. https://bugzilla.gnome.org/show_bug.cgi?id=759539
-rw-r--r--gst/audioparsers/gstaacparse.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gst/audioparsers/gstaacparse.c b/gst/audioparsers/gstaacparse.c
index cd75b7f53..a9b624802 100644
--- a/gst/audioparsers/gstaacparse.c
+++ b/gst/audioparsers/gstaacparse.c
@@ -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)) {