mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-24 11:54:01 +00:00
Allow files without any tracks in it (e.g. for chapters only). Patch by Steve Lhomme (steve ! lhomme () free ! fr) with modifications by myself.
This commit is contained in:
parent
860c15c144
commit
97803c2e6f
@ -1890,11 +1890,6 @@ parse_args(vector<string> args) {
|
||||
}
|
||||
}
|
||||
|
||||
if (files.size() == 0) {
|
||||
usage();
|
||||
mxexit();
|
||||
}
|
||||
|
||||
if (no_linking &&
|
||||
((seguid_link_previous != NULL) || (seguid_link_next != NULL))) {
|
||||
mxwarn(_("'--link' must be used if '--link-to-previous' or "
|
||||
@ -1942,7 +1937,7 @@ main(int argc,
|
||||
|
||||
create_readers();
|
||||
|
||||
if (packetizers.size() == 0)
|
||||
if ((packetizers.size() == 0) && (files.size() != 0))
|
||||
mxerror(_("No streams to output were found. Aborting.\n"));
|
||||
|
||||
create_next_output_file();
|
||||
|
@ -584,14 +584,18 @@ render_headers(mm_io_c *rout) {
|
||||
kax_infos->Render(*rout, true);
|
||||
kax_sh_main->IndexThis(*kax_infos, *kax_segment);
|
||||
|
||||
kax_tracks->Render(*rout, !hack_engaged(ENGAGE_NO_DEFAULT_HEADER_VALUES));
|
||||
kax_sh_main->IndexThis(*kax_tracks, *kax_segment);
|
||||
if (packetizers.size() > 0) {
|
||||
kax_tracks->Render(*rout,
|
||||
!hack_engaged(ENGAGE_NO_DEFAULT_HEADER_VALUES));
|
||||
kax_sh_main->IndexThis(*kax_tracks, *kax_segment);
|
||||
|
||||
// Reserve some small amount of space for header changes by the
|
||||
// packetizers.
|
||||
void_after_track_headers = new EbmlVoid;
|
||||
void_after_track_headers->SetSize(1024);
|
||||
void_after_track_headers->Render(*rout);
|
||||
}
|
||||
|
||||
// Reserve some small amount of space for header changes by the
|
||||
// packetizers.
|
||||
void_after_track_headers = new EbmlVoid;
|
||||
void_after_track_headers->SetSize(1024);
|
||||
void_after_track_headers->Render(*rout);
|
||||
} catch (exception &ex) {
|
||||
mxerror(_("The track headers could not be rendered correctly. %s.\n"),
|
||||
BUGMSG);
|
||||
@ -1251,7 +1255,7 @@ add_tags_from_cue_chapters() {
|
||||
uint32_t tuid;
|
||||
bool found;
|
||||
|
||||
if (tags_from_cue_chapters == NULL)
|
||||
if ((tags_from_cue_chapters == NULL) || (ptzrs_in_header_order.size() == 0))
|
||||
return;
|
||||
|
||||
found = false;
|
||||
|
Loading…
Reference in New Issue
Block a user