diff options
-rw-r--r-- | mencoder.c | 3 | ||||
-rw-r--r-- | mplayer.c | 3 |
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; @@ -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; |