aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar arpi_esp <arpi_esp@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-06-04 19:30:24 +0000
committerGravatar arpi_esp <arpi_esp@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-06-04 19:30:24 +0000
commitb2b9d98b8f35204705c67c8ae3304d7461fe6b7e (patch)
tree58e76260868441952dad776a19bf81fad39f5e55
parent5c4673d96aaff51e84c02e00a045308691e6e22d (diff)
finished .asf seeking
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1010 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--mplayer.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/mplayer.c b/mplayer.c
index b9738d13a5..ee15738c6b 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -2219,6 +2219,22 @@ switch(file_format){
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;