Mercurial > mplayer.hg
changeset 3772:f9d9f6ab79f4
mpeg startpos (-ss, -chapter) fixed
author | arpi |
---|---|
date | Wed, 26 Dec 2001 20:44:56 +0000 |
parents | a14b3a600b81 |
children | 2d8dbcd9a0e5 |
files | libmpdemux/demuxer.c |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/demuxer.c Wed Dec 26 19:45:49 2001 +0000 +++ b/libmpdemux/demuxer.c Wed Dec 26 20:44:56 2001 +0000 @@ -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!