From ac9c2c71e814c582058be2067bdd349ec4e16acb Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Sun, 3 Oct 2004 18:10:57 +0000 Subject: [PATCH] Merged 2279 --- src/mkvmerge.cpp | 5 +++-- src/pr_generic.cpp | 7 +++++++ src/pr_generic.h | 2 ++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/mkvmerge.cpp b/src/mkvmerge.cpp index fd6d5ef3d..253a60e37 100644 --- a/src/mkvmerge.cpp +++ b/src/mkvmerge.cpp @@ -1694,9 +1694,10 @@ create_readers() { } if (!identifying) { - for (i = 0; i < files.size(); i++) { + for (i = 0; i < files.size(); i++) files[i]->reader->create_packetizers(); - } + for (i = 0; i < files.size(); i++) + files[i]->reader->check_track_ids_and_packetizers(); } } diff --git a/src/pr_generic.cpp b/src/pr_generic.cpp index a96bee772..b6e9dccbe 100644 --- a/src/pr_generic.cpp +++ b/src/pr_generic.cpp @@ -1314,6 +1314,13 @@ generic_reader_c::display_progress(bool) { act_wchar = 0; } +void +generic_reader_c::check_track_ids_and_packetizers() { + if (reader_packetizers.size() == 0) + mxwarn(FMT_FN "No tracks will be copied from this file. This usually " + "indicates a mistake in the command line.\n", ti->fname); +} + // //-------------------------------------------------------------------- diff --git a/src/pr_generic.h b/src/pr_generic.h index 2b56d9207..87ae13649 100644 --- a/src/pr_generic.h +++ b/src/pr_generic.h @@ -286,6 +286,8 @@ public: virtual int add_packetizer(generic_packetizer_c *ptzr); virtual void set_timecode_offset(int64_t offset); + virtual void check_track_ids_and_packetizers(); + protected: virtual bool demuxing_requested(char type, int64_t id); };