Commit fd8168bd authored by Denis Charmet's avatar Denis Charmet Committed by 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.mkvSigned-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 16aec732
......@@ -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" );
......
......@@ -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 );
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment