Opus output: give frames with discard padding their own BlockGroup

Fixes #2100.
This commit is contained in:
Moritz Bunkus 2017-09-24 23:06:03 +02:00
parent 46832b5f30
commit 6d21a24a42
5 changed files with 14 additions and 2 deletions

View File

@ -25,6 +25,8 @@
coordinate x" and "white colour coordinate y" in the output file.
* MKVToolNix GUI: header editor: removed the check for external modification
when saving the file. Fixes #2097.
* mkvmerge: Opus output: mkvmerge will now put all frames with discard padding
into their own block group. Fixes #2100.
## Build system changes

View File

@ -444,6 +444,7 @@ cluster_helper_c::render() {
|| !pack->is_key_frame()
|| has_codec_state
|| pack->has_discard_padding()
|| render_group->m_has_discard_padding
|| must_duration_be_set(nullptr, pack)
|| source->is_lacing_prevented();
@ -521,8 +522,10 @@ cluster_helper_c::render() {
}
}
if (pack->has_discard_padding())
if (pack->has_discard_padding()) {
GetChild<KaxDiscardPadding>(*new_block_group).SetValue(pack->discard_padding.to_ns());
render_group->m_has_discard_padding = true;
}
}
elements_in_cluster++;

View File

@ -22,12 +22,13 @@ public:
std::vector<kax_block_blob_cptr> m_groups;
std::vector<int64_t> m_durations;
generic_packetizer_c *m_source;
bool m_more_data, m_duration_mandatory;
bool m_more_data, m_duration_mandatory, m_has_discard_padding;
render_groups_c(generic_packetizer_c *source)
: m_source(source)
, m_more_data(false)
, m_duration_mandatory(false)
, m_has_discard_padding{}
{
}
};

View File

@ -460,3 +460,4 @@ T_611info_null_pointer_dereference_for_ebmlbinary:eaaec943902f1aea38ba3c85c58794
T_612dts_provided_timestamp_used_too_early:ae879a711c571394195ec4dcd2a6a6a3:passed:20170813-175153:0.010423057
T_613vorbis_in_mp4:bcf052d24ed82ff0de57425259d075db:passed:20170910-175618:0.014743465
T_614white_colour_coordinates_from_mkv:916ae39f45a435c0b526d875c378e199-916ae39f45a435c0b526d875c378e199:passed:20170916-112249:0.094985684
T_615opus_discard_padding_in_the_middle:1b2e18413bab72c0d669a406fc403b38:passed:20170924-230527:0.025602623

View File

@ -0,0 +1,5 @@
#!/usr/bin/ruby -w
# T_615opus_discard_padding_in_the_middle
describe "mkvmerge / Opus with frames with discard padding in the middle"
test_merge "data/opus/discard-padding-in-the-middle.opus"