changeset 13299:6f8fe531dd73

avoid always skipping first junk with a "sync lost" message
author reimar
date Thu, 09 Sep 2004 19:28:54 +0000
parents a7bde33bd7d8
children 47dd02fb02df
files libmpdemux/demux_nsv.c
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_nsv.c	Thu Sep 09 19:24:12 2004 +0000
+++ b/libmpdemux/demux_nsv.c	Thu Sep 09 19:28:54 2004 +0000
@@ -277,8 +277,9 @@
                     }
                 }
 
-
-                stream_seek(demuxer->stream,stream_tell(demuxer->stream)-10);
+                // data starts 10 bytes before current pos but later
+                // we seek 17 backwards
+                stream_skip(demuxer->stream,7);
             } 
             
         switch(priv->fps){
@@ -304,7 +305,8 @@
        }
     }   
 
-    
+    // seek to start of NSV header
+    stream_seek(demuxer->stream,stream_tell(demuxer->stream)-17);
     
     return demuxer;
 }