oggdemux: don't seek when no current chain
authorWim Taymans <wim.taymans@collabora.co.uk>
Thu, 6 May 2010 11:10:54 +0000 (13:10 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Thu, 6 May 2010 11:10:54 +0000 (13:10 +0200)
Avoid a crash when we try to seek when there is no current chain.

ext/ogg/gstoggdemux.c

index e41d04f..c29e0e4 100644 (file)
@@ -2384,6 +2384,8 @@ gst_ogg_demux_perform_seek_push (GstOggDemux * ogg, GstEvent * event)
   }
 
   chain = ogg->current_chain;
+  if (!chain)
+    return FALSE;
 
   if (do_index_search (ogg, chain, 0, -1, 0, -1, start, &best, &best_time)) {
     /* the index gave some result */