smoothstreaming: avoid using an uninitialized manifest
authorVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Wed, 9 Apr 2014 16:28:49 +0000 (17:28 +0100)
committerVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Thu, 10 Apr 2014 08:51:07 +0000 (09:51 +0100)
If we did not set the manifest yet, early out in the seeking query.

Coverity 1139737

ext/smoothstreaming/gstmssdemux.c

index aa74164..56889ea 100644 (file)
@@ -656,7 +656,9 @@ gst_mss_demux_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
       GstFormat fmt;
       gint64 stop = -1;
 
-      if (mssdemux->manifest && gst_mss_manifest_is_live (mssdemux->manifest)) {
+      if (!mssdemux->manifest) {
+        return FALSE;           /* no seeking without manifest */
+      } else if (gst_mss_manifest_is_live (mssdemux->manifest)) {
         return FALSE;           /* no live seeking */
       }