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:
parent
d4a4bb3651
commit
e8870c3db7
@ -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, ¤t);
|
||||
if(ris == STREAM_UNSUPORTED && !mode) return -1;
|
||||
chapter += current;
|
||||
}
|
||||
|
||||
if(demuxer->video->sh)
|
||||
ds_free_packs(demuxer->video);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user