summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-02-28 19:41:40 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-02-28 19:41:40 +0000
commit576e184411c300a921fde69194954378d335fffa (patch)
tree1cf32d4d1c1b62ad90c871c52a033d5b9bdae0c7
parenta21190b9d3ba6bdf72097077963db9bd40bc6dad (diff)
downloadmpv-576e184411c300a921fde69194954378d335fffa.tar.bz2
mpv-576e184411c300a921fde69194954378d335fffa.tar.xz
Attempt to fix -chapter broken for mkv in r25987
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26113 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--mencoder.c3
-rw-r--r--mplayer.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/mencoder.c b/mencoder.c
index 9cf7de10cc..4f93cd8d2a 100644
--- a/mencoder.c
+++ b/mencoder.c
@@ -602,7 +602,8 @@ if(stream->type==STREAMTYPE_DVDNAV){
if(dvd_chapter>1) {
float pts;
- demuxer_seek_chapter(demuxer, dvd_chapter-1, 1, &pts, NULL, NULL);
+ if (demuxer_seek_chapter(demuxer, dvd_chapter-1, 1, &pts, NULL, NULL) >= 0 && pts > -1.0)
+ seek_to_sec = pts;
}
d_audio=demuxer2 ? demuxer2->audio : demuxer->audio;
diff --git a/mplayer.c b/mplayer.c
index c82c63686d..7d676b1fd8 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -3274,7 +3274,8 @@ 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);
+ if (demuxer_seek_chapter(mpctx->demuxer, dvd_chapter-1, 1, &pts, NULL, NULL) >= 0 && pts > -1.0)
+ seek(mpctx, pts, SEEK_ABSOLUTE);
}
initialized_flags|=INITIALIZED_DEMUXER;