[MPlayer-cvslog] r19898 - trunk/stream/stream_dvdnav.c

nicodvb subversion at mplayerhq.hu
Mon Sep 18 23:12:22 CEST 2006


Author: nicodvb
Date: Mon Sep 18 23:12:22 2006
New Revision: 19898

Modified:
   trunk/stream/stream_dvdnav.c

Log:
don't seek until dvdnav_get_position() returns something meaningful
(len > 0), or dvdnav may crash or complain.


Modified: trunk/stream/stream_dvdnav.c
==============================================================================
--- trunk/stream/stream_dvdnav.c	(original)
+++ trunk/stream/stream_dvdnav.c	Mon Sep 18 23:12:22 2006
@@ -51,6 +51,8 @@
 int osd_show_dvd_nav_ey;
 int dvd_nav_still=0;            /* are we on a still picture? */
 
+static int seek(stream_t *s, off_t newpos);
+
 dvdnav_priv_t * new_dvdnav_stream(char * filename) {
   char * title_str;
   dvdnav_priv_t *dvdnav_priv;
@@ -248,8 +250,13 @@
   uint32_t pos = 0, len = 0;
 
   status = dvdnav_get_position(priv->dvdnav, &pos, &len);
-  if(status == DVDNAV_STATUS_OK && len)
+  if(status == DVDNAV_STATUS_OK && len) {
     stream->end_pos = (off_t) len * 2048;
+    stream->seek = seek;
+  } else {
+    stream->seek = NULL;
+    stream->end_pos = 0;
+  }
 }
   
 



More information about the MPlayer-cvslog mailing list