static void writer_close(WriterContext **wctx)
{
- if (*wctx && (*wctx)->writer->uninit)
- (*wctx)->writer->uninit(*wctx);
+ if (!*wctx)
+ return;
+ if ((*wctx)->writer->uninit)
+ (*wctx)->writer->uninit(*wctx);
av_freep(&((*wctx)->priv));
av_freep(wctx);
}
av_log(wctx, AV_LOG_ERROR, \
"XSD-compliant output selected but option '%s' was selected, XML output may be non-compliant.\n" \
"You need to disable such option with '-no%s'\n", opt_name, opt_name); \
+ return AVERROR(EINVAL); \
}
CHECK_COMPLIANCE(show_private_data, "private");
CHECK_COMPLIANCE(show_value_unit, "unit");
static void show_usage(void)
{
- printf("Simple multimedia streams analyzer\n");
- printf("usage: %s [OPTIONS] [INPUT_FILE]\n", program_name);
- printf("\n");
+ av_log(NULL, AV_LOG_INFO, "Simple multimedia streams analyzer\n");
+ av_log(NULL, AV_LOG_INFO, "usage: %s [OPTIONS] [INPUT_FILE]\n", program_name);
+ av_log(NULL, AV_LOG_INFO, "\n");
}
static int opt_format(const char *opt, const char *arg)