Mercurial > mplayer.hg
changeset 26081:2cb4aabb7dd8
Attempt to fix -chapter broken for mkv in r25987
author | reimar |
---|---|
date | Thu, 28 Feb 2008 19:41:40 +0000 |
parents | 90e9ac3ee4c0 |
children | 026b1ac69d47 |
files | mencoder.c mplayer.c |
diffstat | 2 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mencoder.c Thu Feb 28 18:32:17 2008 +0000 +++ b/mencoder.c Thu Feb 28 19:41:40 2008 +0000 @@ -602,7 +602,8 @@ 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;
--- a/mplayer.c Thu Feb 28 18:32:17 2008 +0000 +++ b/mplayer.c Thu Feb 28 19:41:40 2008 +0000 @@ -3274,7 +3274,8 @@ 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;