Mercurial > mplayer.hg
comparison libmpdemux/demux_avs.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 | d4fe6e23283e |
children | 67930b46705d |
comparison
equal
deleted
inserted
replaced
25882:2ad528dd42a0 | 25883:baf32110d3fc |
---|---|
416 (double)AVS->video_info->num_frames / sh_video->fps : | 416 (double)AVS->video_info->num_frames / sh_video->fps : |
417 (double)AVS->video_info->num_audio_samples / sh_audio->samplerate; | 417 (double)AVS->video_info->num_audio_samples / sh_audio->samplerate; |
418 | 418 |
419 //mp_msg(MSGT_DEMUX, MSGL_V, "AVS: seek rel_seek_secs = %f - flags = %x\n", rel_seek_secs, flags); | 419 //mp_msg(MSGT_DEMUX, MSGL_V, "AVS: seek rel_seek_secs = %f - flags = %x\n", rel_seek_secs, flags); |
420 | 420 |
421 // seek absolute | 421 if (flags&SEEK_ABSOLUTE) video_pos=0; |
422 if (flags&1) video_pos=0; | 422 if (flags&SEEK_FACTOR) rel_seek_secs *= duration; |
423 // seek precent | |
424 if (flags&2) rel_seek_secs *= duration; | |
425 | 423 |
426 video_pos += rel_seek_secs; | 424 video_pos += rel_seek_secs; |
427 if (video_pos < 0) video_pos = 0; | 425 if (video_pos < 0) video_pos = 0; |
428 | 426 |
429 if (sh_video) { | 427 if (sh_video) { |