Mercurial > mplayer.hg
comparison mplayer.c @ 495:d4eb6bd44bbc
Seeking to sector boundary (STREAM_BUFFER_SIZE) for MPEGs
author | lgb |
---|---|
date | Tue, 17 Apr 2001 22:59:25 +0000 |
parents | 888a85621f50 |
children | c2b3a1f340c8 |
comparison
equal
deleted
inserted
replaced
494:16204dea362c | 495:d4eb6bd44bbc |
---|---|
1906 else | 1906 else |
1907 newpos=demuxer->filepos+(picture->bitrate*1000/16)*rel_seek_secs; | 1907 newpos=demuxer->filepos+(picture->bitrate*1000/16)*rel_seek_secs; |
1908 // picture->bitrate=2324*75*8; // standard VCD bitrate (75 sectors / sec) | 1908 // picture->bitrate=2324*75*8; // standard VCD bitrate (75 sectors / sec) |
1909 | 1909 |
1910 if(newpos<seek_to_byte) newpos=seek_to_byte; | 1910 if(newpos<seek_to_byte) newpos=seek_to_byte; |
1911 #ifdef HAVE_LIBCSS | 1911 newpos&=~(STREAM_BUFFER_SIZE-1); /* sector boundary */ |
1912 if (dvd_device) newpos&=~(STREAM_BUFFER_SIZE-1); /* sector boundary */ | |
1913 #endif | |
1914 stream_seek(demuxer->stream,newpos); | 1912 stream_seek(demuxer->stream,newpos); |
1915 // re-sync video: | 1913 // re-sync video: |
1916 videobuf_code_len=0; // reset ES stream buffer | 1914 videobuf_code_len=0; // reset ES stream buffer |
1917 while(1){ | 1915 while(1){ |
1918 int i=sync_video_packet(d_video); | 1916 int i=sync_video_packet(d_video); |