changeset 19438:263e95c47aec

support relative seeking in the stream-driven case
author nicodvb
date Fri, 18 Aug 2006 19:03:31 +0000
parents c73bf418b291
children 28d2d1fddff4
files libmpdemux/demuxer.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demuxer.c	Fri Aug 18 18:58:38 2006 +0000
+++ b/libmpdemux/demuxer.c	Fri Aug 18 19:03:31 2006 +0000
@@ -1063,6 +1063,12 @@
     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);