Ogg/OGM reader: fix skipping unsupported tracks & those missing header pages

Fixes #3394.
This commit is contained in:
Moritz Bunkus 2022-09-04 15:36:15 +02:00
parent e3c3fff6fb
commit 6ee9d4f1f4
No known key found for this signature in database
GPG Key ID: 74AF00ADF2E32C85
4 changed files with 21 additions and 2 deletions

View File

@ -1,3 +1,12 @@
# Version ?
## Bug fixes
* mkvmerge: Ogg/OGM reader: mkvmerge will now correctly skip tracks of
unsupported types as well as tracks for which all track header pages
haven't been found. Fixes #3394.
# Version 70.0.0 "Caught A Lite Sneeze" 2022-08-14
## New features and enhancements

View File

@ -600,10 +600,11 @@ ogm_reader_c::read_headers_internal() {
ogg_page og;
bool done = false;
while (!done) {
// Make sure we have a page that we can work with.
if (read_page(&og) == FILE_STATUS_DONE)
return 0;
break;
// Is this the first page of a new stream?
if (ogg_page_bos(&og))
@ -629,7 +630,9 @@ ogm_reader_c::read_headers_internal() {
ogg_sync_clear(&oy);
ogg_sync_init(&oy);
return 1;
sdemuxers.erase(std::remove_if(sdemuxers.begin(), sdemuxers.end(), [](auto const &dmx) { return !dmx->headers_read; }), sdemuxers.end());
return bos_pages_read ? 1 : 0;
}
/*

View File

@ -590,3 +590,4 @@ T_0742keep_color_properties:f99978ce621faace934d2eee7c5f847e-ea5af7e794ef2fed2fb
T_0743propedit_video_color_attributes_old_names:7041e2720c1c107e8c507b5d647edb4f+66aedfb541c058fffb0403d1681fe1a3+9a6d5a33c6d53e14ad860122a972747c+c9aa4c93f4e6b027970462a9de687c04-4f96c2b3c3aabd53c5c67267abe20deb+82b4ae1a511f00db3ed26f43f1b64858+b5560878b38c77266ceffd0a4f0e6d4d+553b9d004d0ba4838acd5a6cbc883994:passed:20220709-111335:0.656156337
T_0744hevc_first_unspec_nalus_after_one_mb_of_data:90a41a6db1951cf44d540bae5833751d:passed:20220709-115511:0.27140422
T_0745av1_single_frame:d9418a3f3976542657b3fbc6f6ad002e:passed:20220730-122150:0.044258962
T_0746ogg_unknown_track_and_kate_missing_headers:ce39d6bfa056cae15b82e822bcbf7bbf:passed:20220904-153425:0.031062254

View File

@ -0,0 +1,6 @@
#!/usr/bin/ruby -w
# T_746ogg_unknown_track_and_kate_missing_headers
describe "mkvmerge / Ogg: stream of unknown/unsupported type and a Kate stream missing its headers"
test_merge "data/ogg/unknown_stream_and_kate_without_headers.ogv"