Mercurial > mplayer.hg
changeset 1009:c51d7e4853d6
finished .asf seeking
author | arpi_esp |
---|---|
date | Mon, 04 Jun 2001 19:30:24 +0000 |
parents | 1b6e183b8a87 |
children | 6d3a6d42c831 |
files | mplayer.c |
diffstat | 1 files changed, 16 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mplayer.c Mon Jun 04 18:43:35 2001 +0000 +++ b/mplayer.c Mon Jun 04 19:30:24 2001 +0000 @@ -2219,6 +2219,22 @@ if(newpos<0 || newpos<demuxer->movi_start) newpos=demuxer->movi_start; // printf("\r -- asf: newpos=%d -- \n",newpos); stream_seek(demuxer->stream,newpos); + + ds_fill_buffer(d_video); + if(has_audio) ds_fill_buffer(d_audio); + + while(1){ + if(has_audio){ + // sync audio: + if (d_video->pts > d_audio->pts){ + if(!ds_fill_buffer(d_audio)) has_audio=0; // skip audio. EOF? + continue; + } + } + if(d_video->flags&1) break; // found a keyframe! + if(!ds_fill_buffer(d_video)) break; // skip frame. EOF? + } + } break;