Matroska-Org / libmatroska

a C++ libary to parse Matroska files (.mkv and .mka)
GNU Lesser General Public License v2.1
324 stars 57 forks source link

Fix crashes in test6 #177

Closed robUx4 closed 9 months ago

robUx4 commented 9 months ago

Fixes #176, this will need a backport.

The Block reference handling seems bogus as it thinks it owns the reference Block. It seems mkvtoolnix doesn't use this (muxing) feature so no problem there. We may fix it in 2.0 or just remove the feature.

mbunkus commented 9 months ago

Due to this I've long since used a derived class from KaxReferenceBlock that allows me to set the value directly instead of letting the class calculate the value from blocks.

robUx4 commented 9 months ago

Maybe we can use weak references in 2.0 https://en.cppreference.com/w/cpp/memory/weak_ptr ?