Commit 0f40105a authored by Stefano Sabatini's avatar Stefano Sabatini

ffprobe: print codec_long_name only when available

Avoid possible segmentation fault if codec_long_name is defined as
NULL (for example if --enable-small).
parent fb96ac46
......@@ -1656,7 +1656,8 @@ static void show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_i
const char *profile = NULL;
if ((dec = dec_ctx->codec)) {
print_str("codec_name", dec->name);
print_str("codec_long_name", dec->long_name);
if (dec->long_name) print_str ("codec_long_name", dec->long_name);
else print_str_opt("codec_long_name", "unknown");
} else {
print_str_opt("codec_name", "unknown");
print_str_opt("codec_long_name", "unknown");
......
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