decodebin: consider "no demuxer" case to not have dynamic pads
authorVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Thu, 10 Apr 2014 12:34:58 +0000 (13:34 +0100)
committerVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Thu, 10 Apr 2014 12:51:18 +0000 (13:51 +0100)
This fixes a possible NULL dereference.

Coverity 1195146

gst/playback/gstdecodebin2.c

index 3b5d456104486b5620a7bb17a90569354c3629d4..2789a14142b4757009b32e9499981ba5b5276e3f 100644 (file)
@@ -1528,7 +1528,7 @@ analyze_new_pad (GstDecodeBin * dbin, GstElement * src, GstPad * pad,
     /* If this is not a dynamic pad demuxer, we're no-more-pads
      * already before anything else happens
      */
-    if (!demux->no_more_pads_id)
+    if (demux == NULL || !demux->no_more_pads_id)
       group->no_more_pads = TRUE;
   }