[vlc-devel] [PATCH 5/8] mkv: a subchapter with no end timestamp cannot match the chapter looked for
Denis Charmet
typx at dinauz.org
Wed Mar 16 14:46:32 CET 2016
On 2016-03-16 13:43, Steve Lhomme wrote:
> ---
> modules/demux/mkv/virtual_segment.cpp | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/modules/demux/mkv/virtual_segment.cpp
> b/modules/demux/mkv/virtual_segment.cpp
> index bda0883..5b6193d 100644
> --- a/modules/demux/mkv/virtual_segment.cpp
> +++ b/modules/demux/mkv/virtual_segment.cpp
> @@ -377,7 +377,8 @@ virtual_chapter_c*
> virtual_chapter_c::getSubChapterbyTimecode( int64_t time )
> {
> for( size_t i = 0; i < sub_vchapters.size(); i++ )
> {
> - if( time >= sub_vchapters[i]->i_mk_virtual_start_time &&
> time < sub_vchapters[i]->i_mk_virtual_stop_time )
> + if( time >= sub_vchapters[i]->i_mk_virtual_start_time &&
> + ( sub_vchapters[i]->i_mk_virtual_stop_time < 0 || time <
> sub_vchapters[i]->i_mk_virtual_stop_time ) )
With this you will most likely always return the first chapter if there
are no stop time.
> return sub_vchapters[i]->getSubChapterbyTimecode( time );
> }
Regards,
--
Denis Charmet - TypX
Le mauvais esprit est un art de vivre
More information about the vlc-devel
mailing list