vlc | branch: master | Denis Charmet <[email protected]> | Tue Nov 1 15:42:43 2011 +0100| [fd8168bd1b035bdb3c00c73727a5ec3171106173] | committer: Jean-Baptiste Kempf
Fix a bug preventing files without segment duration And fix the crash of http://streams.videolan.org/issues/mkv/invalid_EBML_number_size_tag.mkv Signed-off-by: Jean-Baptiste Kempf <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fd8168bd1b035bdb3c00c73727a5ec3171106173 --- modules/demux/mkv/demux.cpp | 2 ++ modules/demux/mkv/virtual_segment.cpp | 4 +++- 2 files changed, 5 insertions(+), 1 deletions(-) diff --git a/modules/demux/mkv/demux.cpp b/modules/demux/mkv/demux.cpp index ac399d4..6ebcaef 100644 --- a/modules/demux/mkv/demux.cpp +++ b/modules/demux/mkv/demux.cpp @@ -697,6 +697,8 @@ bool demux_sys_t::PreparePlayback( virtual_segment_c *p_new_segment ) p_current_segment = p_new_segment; i_current_title = p_new_segment->i_sys_title; } + if( !p_current_segment->CurrentSegment() ) + return false; if( !p_current_segment->CurrentSegment()->b_cues ) msg_Warn( &p_current_segment->CurrentSegment()->sys.demuxer, "no cues/empty cues found->seek won't be precise" ); diff --git a/modules/demux/mkv/virtual_segment.cpp b/modules/demux/mkv/virtual_segment.cpp index 7f7e191..ccd462f 100644 --- a/modules/demux/mkv/virtual_segment.cpp +++ b/modules/demux/mkv/virtual_segment.cpp @@ -351,7 +351,9 @@ virtual_chapter_c* virtual_edition_c::getChapterbyTimecode( int64_t time ) { for( size_t i = 0; i < chapters.size(); i++ ) { - if( time >= chapters[i]->i_virtual_start_time && time < chapters[i]->i_virtual_stop_time ) + if( time >= chapters[i]->i_virtual_start_time && + ( chapters[i]->i_virtual_stop_time < 0 || time < chapters[i]->i_virtual_stop_time ) ) + /*with the current implementation only the last chapter can have a negative virtual_stop_time*/ return chapters[i]->getSubChapterbyTimecode( time ); } _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
