Mercurial > mplayer.hg
comparison libmpdemux/demux_viv.c @ 2792:ad82a618b371
checking for EOF
author | alex |
---|---|
date | Sat, 10 Nov 2001 12:36:03 +0000 |
parents | 4a909be26ea1 |
children | 478202620831 |
comparison
equal
deleted
inserted
replaced
2791:8ef2ab5cd47f | 2792:ad82a618b371 |
---|---|
172 int orig_pos = stream_tell(demuxer->stream); | 172 int orig_pos = stream_tell(demuxer->stream); |
173 | 173 |
174 mp_msg(MSGT_DEMUX,MSGL_V,"Checking for VIVO\n"); | 174 mp_msg(MSGT_DEMUX,MSGL_V,"Checking for VIVO\n"); |
175 | 175 |
176 c=stream_read_char(demuxer->stream); | 176 c=stream_read_char(demuxer->stream); |
177 if(c) return 0; | 177 if(c==-256) return 0; |
178 len=0; | 178 len=0; |
179 while((c=stream_read_char(demuxer->stream))>=0x80){ | 179 while((c=stream_read_char(demuxer->stream))>=0x80){ |
180 len+=0x80*(c-0x80); | 180 len+=0x80*(c-0x80); |
181 if(len>1024) return 0; | 181 if(len>1024) return 0; |
182 } | 182 } |
236 int len=0; | 236 int len=0; |
237 int seq; | 237 int seq; |
238 demux->filepos=stream_tell(demux->stream); | 238 demux->filepos=stream_tell(demux->stream); |
239 | 239 |
240 c=stream_read_char(demux->stream); | 240 c=stream_read_char(demux->stream); |
241 if (c == -256) /* EOF */ | |
242 return 0; | |
241 // printf("c=%02X\n",c); | 243 // printf("c=%02X\n",c); |
242 switch(c&0xF0){ | 244 switch(c&0xF0){ |
243 case 0x00: // header - skip it! | 245 case 0x00: // header - skip it! |
244 { | 246 { |
245 len=stream_read_char(demux->stream); | 247 len=stream_read_char(demux->stream); |