mkvmerge: allow appending video tracks with differing pixel dimensions

Implements #2582.
This commit is contained in:
Moritz Bunkus 2019-07-08 18:08:39 +02:00
parent 1aefcdc2cb
commit 2548a7f349
No known key found for this signature in database
GPG Key ID: 74AF00ADF2E32C85
7 changed files with 9 additions and 21 deletions

View File

@ -1,3 +1,11 @@
# Version ?
## New features and enhancements
* mkvmerge: mkvmerge now allows appending AV1, VP8, VP9, h.264/AVC and
h.265/HEVC tracks whose pixel dimensions differ. Implements #2582.
# Version 35.0.0 "All The Love In The World" 2019-06-22
## New features and enhancements

View File

@ -142,14 +142,11 @@ av1_video_packetizer_c::set_is_unframed() {
connection_result_e
av1_video_packetizer_c::can_connect_to(generic_packetizer_c *src,
std::string &error_message) {
std::string &) {
auto psrc = dynamic_cast<av1_video_packetizer_c *>(src);
if (!psrc)
return CAN_CONNECT_NO_FORMAT;
connect_check_v_width( m_hvideo_pixel_width, psrc->m_hvideo_pixel_width);
connect_check_v_height(m_hvideo_pixel_height, psrc->m_hvideo_pixel_height);
return CAN_CONNECT_YES;
}

View File

@ -128,10 +128,6 @@ avc_video_packetizer_c::can_connect_to(generic_packetizer_c *src,
if (!vsrc)
return CAN_CONNECT_NO_FORMAT;
auto result = generic_video_packetizer_c::can_connect_to(src, error_message);
if (CAN_CONNECT_YES != result)
return result;
if (m_ti.m_private_data && vsrc->m_ti.m_private_data && memcmp(m_ti.m_private_data->get_buffer(), vsrc->m_ti.m_private_data->get_buffer(), m_ti.m_private_data->get_size())) {
error_message = fmt::format(Y("The codec's private data does not match. Both have the same length ({0}) but different content."), m_ti.m_private_data->get_size());
return CAN_CONNECT_MAYBE_CODECPRIVATE;

View File

@ -231,9 +231,6 @@ avc_es_video_packetizer_c::can_connect_to(generic_packetizer_c *src,
if (!vsrc)
return CAN_CONNECT_NO_FORMAT;
connect_check_v_width( m_hvideo_pixel_width, vsrc->m_hvideo_pixel_width);
connect_check_v_height(m_hvideo_pixel_height, vsrc->m_hvideo_pixel_height);
connect_check_codec_id(m_hcodec_id, vsrc->m_hcodec_id);
connect_check_codec_private(src);
return CAN_CONNECT_YES;

View File

@ -96,10 +96,6 @@ hevc_video_packetizer_c::can_connect_to(generic_packetizer_c *src,
if (!vsrc)
return CAN_CONNECT_NO_FORMAT;
auto result = generic_video_packetizer_c::can_connect_to(src, error_message);
if (CAN_CONNECT_YES != result)
return result;
if (m_ti.m_private_data && vsrc->m_ti.m_private_data && memcmp(m_ti.m_private_data->get_buffer(), vsrc->m_ti.m_private_data->get_buffer(), m_ti.m_private_data->get_size())) {
error_message = fmt::format(Y("The codec's private data does not match. Both have the same length ({0}) but different content."), m_ti.m_private_data->get_size());
return CAN_CONNECT_MAYBE_CODECPRIVATE;

View File

@ -212,9 +212,6 @@ hevc_es_video_packetizer_c::can_connect_to(generic_packetizer_c *src,
if (!vsrc)
return CAN_CONNECT_NO_FORMAT;
connect_check_v_width( m_hvideo_pixel_width, vsrc->m_hvideo_pixel_width);
connect_check_v_height(m_hvideo_pixel_height, vsrc->m_hvideo_pixel_height);
connect_check_codec_id(m_hcodec_id, vsrc->m_hcodec_id);
connect_check_codec_private(src);
return CAN_CONNECT_YES;

View File

@ -121,9 +121,6 @@ vpx_video_packetizer_c::can_connect_to(generic_packetizer_c *src,
connect_check_codec_id(m_hcodec_id, psrc->m_hcodec_id);
connect_check_v_width(m_hvideo_pixel_width, psrc->m_hvideo_pixel_width);
connect_check_v_height(m_hvideo_pixel_height, psrc->m_hvideo_pixel_height);
return CAN_CONNECT_YES;
}