changeset 2792:ad82a618b371

checking for EOF
author alex
date Sat, 10 Nov 2001 12:36:03 +0000
parents 8ef2ab5cd47f
children 38cb77fd3427
files libmpdemux/demux_viv.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_viv.c	Fri Nov 09 23:49:03 2001 +0000
+++ b/libmpdemux/demux_viv.c	Sat Nov 10 12:36:03 2001 +0000
@@ -174,7 +174,7 @@
     mp_msg(MSGT_DEMUX,MSGL_V,"Checking for VIVO\n");
     
     c=stream_read_char(demuxer->stream);
-    if(c) return 0;
+    if(c==-256) return 0;
     len=0;
     while((c=stream_read_char(demuxer->stream))>=0x80){
 	len+=0x80*(c-0x80);
@@ -238,6 +238,8 @@
   demux->filepos=stream_tell(demux->stream);
   
   c=stream_read_char(demux->stream);
+  if (c == -256) /* EOF */
+    return 0;
 //  printf("c=%02X\n",c);
   switch(c&0xF0){
   case 0x00: // header - skip it!