summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
authornicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-02-11 22:03:34 +0000
committernicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-02-11 22:03:34 +0000
commitf785eba8a1af1345bd757e00ab419c8b0120f5ea (patch)
tree8f5cdfe5fb3566ee8bee093064287be0ea47db0c /mplayer.c
parentd31f87b06cda035677139b262ef260c9fac31bed (diff)
downloadmpv-f785eba8a1af1345bd757e00ab419c8b0120f5ea.tar.bz2
mpv-f785eba8a1af1345bd757e00ab419c8b0120f5ea.tar.xz
-chapter is now handled uniformly calling demuxer_seek_chapter() instead
of letting individual demuxers and stream readers do their nasty job git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25987 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/mplayer.c b/mplayer.c
index d2a1a807ce..50ea3109d7 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -3278,6 +3278,11 @@ if (mpctx->demuxer && mpctx->demuxer->type==DEMUXER_TYPE_PLAYLIST)
if(!mpctx->demuxer)
goto goto_next_file;
+if(dvd_chapter>1) {
+ float pts;
+ demuxer_seek_chapter(mpctx->demuxer, dvd_chapter-1, 1, &pts, NULL, NULL);
+}
+
inited_flags|=INITED_DEMUXER;
if (mpctx->stream->type != STREAMTYPE_DVD && mpctx->stream->type != STREAMTYPE_DVDNAV) {
@@ -3644,6 +3649,13 @@ if (mpctx->stream->type == STREAMTYPE_DVDNAV) {
while(!mpctx->eof){
float aq_sleep_time=0;
+
+if(dvd_last_chapter>0) {
+ int cur_chapter = demuxer_get_current_chapter(mpctx->demuxer);
+ if(cur_chapter!=-1 && cur_chapter+1>dvd_last_chapter)
+ goto goto_next_file;
+}
+
if(!mpctx->sh_audio && mpctx->d_audio->sh) {
mpctx->sh_audio = mpctx->d_audio->sh;
mpctx->sh_audio->ds = mpctx->d_audio;