Mercurial > mplayer.hg
diff mplayer.c @ 25883:baf32110d3fc
Use defines to give names to the different seek flags.
A better solution should be considered later, esp. for the many
broken demuxers that do not treat these flags correctly.
author | reimar |
---|---|
date | Tue, 29 Jan 2008 15:11:38 +0000 |
parents | 43c76ab0bb84 |
children | 21a1dc062bc5 |
line wrap: on
line diff
--- a/mplayer.c Tue Jan 29 14:58:10 2008 +0000 +++ b/mplayer.c Tue Jan 29 15:11:38 2008 +0000 @@ -2483,8 +2483,8 @@ } -// style & 1 == 0 means seek relative to current position, == 1 means absolute -// style & 2 == 0 means amount in seconds, == 2 means fraction of file length +// style & SEEK_ABSOLUTE == 0 means seek relative to current position, == 1 means absolute +// style & SEEK_FACTOR == 0 means amount in seconds, == 2 means fraction of file length // return -1 if seek failed (non-seekable stream?), 0 otherwise static int seek(MPContext *mpctx, double amount, int style) { @@ -3626,7 +3626,7 @@ } if (seek_to_sec) { - seek(mpctx, seek_to_sec, 1); + seek(mpctx, seek_to_sec, SEEK_ABSOLUTE); end_at.pos += seek_to_sec; } @@ -3831,7 +3831,7 @@ if(mpctx->loop_times==1) mpctx->loop_times=-1; play_n_frames=play_n_frames_mf; mpctx->eof=0; - abs_seek_pos=1; rel_seek_secs=seek_to_sec; + abs_seek_pos=SEEK_ABSOLUTE; rel_seek_secs=seek_to_sec; loop_seek = 1; }