[vlc-commits] [Git][videolan/vlc][master] 2 commits: demux: mkv: only read the edition name once
Steve Lhomme (@robUx4)
gitlab at videolan.org
Thu Mar 19 15:59:06 UTC 2026
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
0657a7ba by Steve Lhomme at 2026-03-19T14:55:28+00:00
demux: mkv: only read the edition name once
- - - - -
65f4d092 by Steve Lhomme at 2026-03-19T14:55:28+00:00
demux: mkv: fix title number reading
We are reading the 3rd and 4th bytes in the buffer.
- - - - -
2 changed files:
- modules/demux/mkv/chapter_command_dvd.cpp
- modules/demux/mkv/demux.cpp
Changes:
=====================================
modules/demux/mkv/chapter_command_dvd.cpp
=====================================
@@ -23,7 +23,7 @@ constexpr binary MATROSKA_DVD_LEVEL_CN = 0x08;
int16_t dvd_chapter_codec_c::GetTitleNumber() const
{
- if ( p_private_data != nullptr && p_private_data->GetSize() >= 3)
+ if ( p_private_data != nullptr && p_private_data->GetSize() > 3)
{
const binary* p_data = p_private_data->GetBuffer();
if ( p_data[0] == MATROSKA_DVD_LEVEL_SS )
=====================================
modules/demux/mkv/demux.cpp
=====================================
@@ -221,8 +221,9 @@ bool demux_sys_t::PreloadLinked()
// TODO use a name for each edition, let the TITLE deal with a codec name
if ( p_title->psz_name == NULL )
{
- if( p_ved->GetMainName().length() )
- p_title->psz_name = strdup( p_ved->GetMainName().c_str() );
+ const auto edition_name = p_ved->GetMainName();
+ if( edition_name.length() )
+ p_title->psz_name = strdup( edition_name.c_str() );
else
{
/* Check in tags if the edition has a name */
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/556dd958c0ac086bd90e9064c800a000f04b88b4...65f4d092a6a54e376f063587bdd15e47fa9614e6
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/556dd958c0ac086bd90e9064c800a000f04b88b4...65f4d092a6a54e376f063587bdd15e47fa9614e6
You're receiving this email because of your account on code.videolan.org.
More information about the vlc-commits
mailing list