Commit f1efd079 authored by Moritz Grimm's avatar Moritz Grimm
Browse files

Fix a crash when querying metadata program

Simple copy+paste mistake.
parent 97058387
......@@ -2,6 +2,9 @@ Changes in 1.0.2, released on XXXX-XX-XX:
* Fix a crash, if metadata placeholders are configured for input files
that do not contain the respective values. From gui-lux on Github (#16).
* Fix a crash in one instance of querying the metadata program. From taku0220
on Github (#23).
* Minor documentation tweak
......
......@@ -605,19 +605,18 @@ streamFile(stream_t stream, const char *fileName)
continue;
if (cfg_get_metadata_program()) {
char *mdataStr = NULL;
mdata_t prog_md;
log_info("running metadata program: %s",
cfg_get_metadata_program());
prog_md = mdata_create();
md = mdata_create();
if (0 > mdata_run_program(md, cfg_get_metadata_program()) ||
0 > stream_set_metadata(stream, prog_md, &mdataStr)) {
mdata_destroy(&prog_md);
0 > stream_set_metadata(stream, md, &mdataStr)) {
mdata_destroy(&md);
retval = 0;
ret = STREAM_DONE;
continue;
}
mdata_destroy(&prog_md);
mdata_destroy(&md);
log_info("new metadata: %s", mdataStr);
xfree(mdataStr);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment