This repository has been archived by the owner. It is now read-only.

Error merging two tracks; The track parameters do not match but not details are given #2046

Closed
cinghiale opened this Issue Jul 16, 2017 · 2 comments

Comments

2 participants
@cinghiale

cinghiale commented Jul 16, 2017

I was trying to figure out why mkvmerge refused to start merging with the error "The track parameters do not match".

I found in the file merge/output_control.cpp that the reason for the failed check is stored in the error_message string but never printed.

I've applied the following patch and, at least, I have something to work on:

diff --git a/src/merge/output_control.cpp b/src/merge/output_control.cpp
index 43b9dd172..0631e8593 100644
--- a/src/merge/output_control.cpp
+++ b/src/merge/output_control.cpp
@@ -1053,10 +1053,10 @@ check_append_mapping() {
       std::string reason(  result == CAN_CONNECT_NO_FORMAT     ? Y("The formats do not match.")
                          : result == CAN_CONNECT_NO_PARAMETERS ? Y("The track parameters do not match.")
                          :                                       Y("The reason is unknown."));
-      mxerror(boost::format(Y("The track number %1% from the file '%2%' cannot be appended to the track number %3% from the file '%4%'. %5%\n"))
+      mxerror(boost::format(Y("The track number %1% from the file '%2%' cannot be appended to the track number %3% from the file '%4%'. %5% (%6%)\n"))
               % amap.src_track_id % g_files[amap.src_file_id]->name
               % amap.dst_track_id % g_files[amap.dst_file_id]->name
-              % reason);
+              % reason % error_message);
     }

     src_ptzr->connect(dst_ptzr);
@mbunkus

This comment has been minimized.

Show comment
Hide comment
@mbunkus

mbunkus Jul 16, 2017

Owner

Thanks. I don't like the proposed solution that much. I think it'd be better to replace the "The reason is unknown" with the error message generated by the packetizer in question. Stating that the reason is unknown and giving it in the very next sentence sounds like a sure-fire way to confuse users.

What was the actual error message in your case?

Owner

mbunkus commented Jul 16, 2017

Thanks. I don't like the proposed solution that much. I think it'd be better to replace the "The reason is unknown" with the error message generated by the packetizer in question. Stating that the reason is unknown and giving it in the very next sentence sounds like a sure-fire way to confuse users.

What was the actual error message in your case?

@mbunkus

This comment has been minimized.

Show comment
Hide comment
@mbunkus

mbunkus Jul 16, 2017

Owner

Scratch that. A look at the code reveals that there really are only three "no" cases: parameters, format and a "maybe" due to CodecPrivate not matching. That "reason is unknown" message is solely a fallback for programming errors.

Owner

mbunkus commented Jul 16, 2017

Scratch that. A look at the code reveals that there really are only three "no" cases: parameters, format and a "maybe" due to CodecPrivate not matching. That "reason is unknown" message is solely a fallback for programming errors.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.