[Mplayer-cvslog] CVS: main/libmpdemux demuxer.c,1.57,1.58

Arpi of Ize arpi at mplayer.dev.hu
Wed Dec 26 21:44:58 CET 2001


Update of /cvsroot/mplayer/main/libmpdemux
In directory mplayer:/var/tmp.root/cvs-serv22112

Modified Files:
	demuxer.c 
Log Message:
mpeg startpos (-ss, -chapter) fixed

Index: demuxer.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demuxer.c,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -r1.57 -r1.58
--- demuxer.c	26 Dec 2001 16:34:06 -0000	1.57
+++ demuxer.c	26 Dec 2001 20:44:56 -0000	1.58
@@ -442,16 +442,18 @@
 if(file_format==DEMUXER_TYPE_UNKNOWN || file_format==DEMUXER_TYPE_MPEG_PS){
  int pes=1;
  int tmp;
+ off_t tmppos;
  while(pes>=0){
   demuxer=new_demuxer(stream,DEMUXER_TYPE_MPEG_PS,audio_id,video_id,dvdsub_id);
   
   // try to pre-detect PES:
+  tmppos=stream_tell(demuxer->stream);
   tmp=stream_read_dword(demuxer->stream);
   if(tmp==0x1E0 || tmp==0x1C0){
       tmp=stream_read_word(demuxer->stream);
       if(tmp>1 && tmp<=2048) pes=0; // demuxer->synced=3; // PES...
   }
-  stream_seek(demuxer->stream,0);
+  stream_seek(demuxer->stream,tmppos);
   
   if(!pes) demuxer->synced=3; // hack!
 




More information about the MPlayer-cvslog mailing list