diff options
author | nicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-02-11 22:03:34 +0000 |
---|---|---|
committer | nicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-02-11 22:03:34 +0000 |
commit | f785eba8a1af1345bd757e00ab419c8b0120f5ea (patch) | |
tree | 8f5cdfe5fb3566ee8bee093064287be0ea47db0c /mencoder.c | |
parent | d31f87b06cda035677139b262ef260c9fac31bed (diff) | |
download | mpv-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 'mencoder.c')
-rw-r--r-- | mencoder.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mencoder.c b/mencoder.c index 7fa12f5efe..f6a0783605 100644 --- a/mencoder.c +++ b/mencoder.c @@ -603,6 +603,11 @@ if(stream->type==STREAMTYPE_DVDNAV){ mp_msg(MSGT_DEMUXER, MSGL_FATAL, MSGTR_CannotOpenDemuxer); mencoder_exit(1,NULL); } + + if(dvd_chapter>1) { + float pts; + demuxer_seek_chapter(demuxer, dvd_chapter-1, 1, &pts, NULL, NULL); + } d_audio=demuxer2 ? demuxer2->audio : demuxer->audio; d_video=demuxer->video; @@ -1098,6 +1103,11 @@ while(!at_eof){ --play_n_frames; if(play_n_frames<0) break; } + if(dvd_last_chapter>0) { + int cur_chapter = demuxer_get_current_chapter(demuxer); + if(cur_chapter!=-1 && cur_chapter+1>dvd_last_chapter) + break; + } goto_redo_edl: if (next_edl_record && sh_video && sh_video->pts >= next_edl_record->start_sec) { |