summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2008-11-25 21:12:01 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2008-11-25 21:12:01 +0200
commit835511ac394d5283c9c449e6154ccb0db1365321 (patch)
treec223ee6b82481a0030273cfae9e831dada249fd8 /mplayer.c
parent6c712271ce9e8d4eb9cd615e920139ebcb1d1d49 (diff)
parentcc5e0406412a5f8b4e6e7094f6ffa18a65decd74 (diff)
downloadmpv-835511ac394d5283c9c449e6154ccb0db1365321.tar.bz2
mpv-835511ac394d5283c9c449e6154ccb0db1365321.tar.xz
Merge svn changes up to r28038
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/mplayer.c b/mplayer.c
index b45583e860..d9eb28129d 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -3194,6 +3194,12 @@ if(stream_dump_type==5){
exit_player(mpctx, MSGTR_Exit_error);
}
}
+ if(dvd_last_chapter > 0) {
+ int chapter = -1;
+ if (stream_control(mpctx->stream, STREAM_CTRL_GET_CURRENT_CHAPTER,
+ &chapter) == STREAM_OK && chapter + 1 > dvd_last_chapter)
+ break;
+ }
}
if(fclose(f)) {
mp_msg(MSGT_MENCODER,MSGL_FATAL,MSGTR_ErrorWritingFile,stream_dump_name);
@@ -3380,6 +3386,11 @@ if((stream_dump_type)&&(stream_dump_type<4)){
if( (mpctx->demuxer->file_format==DEMUXER_TYPE_AVI || mpctx->demuxer->file_format==DEMUXER_TYPE_ASF || mpctx->demuxer->file_format==DEMUXER_TYPE_MOV)
&& stream_dump_type==2) fwrite(&in_size,1,4,f);
if(in_size>0) fwrite(start,in_size,1,f);
+ if(dvd_last_chapter>0) {
+ int cur_chapter = demuxer_get_current_chapter(mpctx->demuxer);
+ if(cur_chapter!=-1 && cur_chapter+1>dvd_last_chapter)
+ break;
+ }
}
fclose(f);
mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_CoreDumped);