qtdemux: Check if there's actually a seek table before parsing it
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Sat, 11 Dec 2010 16:49:03 +0000 (17:49 +0100)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Sat, 11 Dec 2010 16:49:03 +0000 (17:49 +0100)
gst/qtdemux/qtdemux.c

index 5a6fb7e..dac0db1 100644 (file)
@@ -876,6 +876,9 @@ gst_qtdemux_find_index_for_given_media_offset_linear (GstQTDemux * qtdemux,
   QtDemuxSample *result = str->samples;
   guint32 index = 0;
 
+  if (result == NULL || str->n_samples == 0)
+    return -1;
+
   if (media_offset == result->offset)
     return index;