1
mirror of https://github.com/mpv-player/mpv synced 2024-11-18 21:16:10 +01:00

support relative seeking in the stream-driven case

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19444 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
nicodvb 2006-08-18 19:03:31 +00:00
parent d4a4bb3651
commit e8870c3db7

View File

@ -1063,6 +1063,12 @@ int demuxer_seek_chapter(demuxer_t *demuxer, int chapter, int mode, float *seek_
sh_audio_t *sh_audio = demuxer->audio->sh;
if (!demuxer->num_chapters || !demuxer->chapters) {
if(!mode) {
ris = stream_control(demuxer->stream, STREAM_CTRL_GET_CURRENT_CHAPTER, &current);
if(ris == STREAM_UNSUPORTED && !mode) return -1;
chapter += current;
}
if(demuxer->video->sh)
ds_free_packs(demuxer->video);