decoder/ffmpeg: check if long_name is not null
This commit is contained in:
parent
ea95da3b1a
commit
5b775ca5b4
@ -602,8 +602,12 @@ ffmpeg_decode(DecoderClient &client, InputStream &input)
|
|||||||
FfmpegOpenInput(stream.io, input.GetURI(), nullptr);
|
FfmpegOpenInput(stream.io, input.GetURI(), nullptr);
|
||||||
|
|
||||||
const auto *input_format = format_context->iformat;
|
const auto *input_format = format_context->iformat;
|
||||||
FmtDebug(ffmpeg_domain, "detected input format '{}' ({})",
|
if (input_format->long_name == nullptr)
|
||||||
input_format->name, input_format->long_name);
|
FmtDebug(ffmpeg_domain, "detected input format '{}'",
|
||||||
|
input_format->name);
|
||||||
|
else
|
||||||
|
FmtDebug(ffmpeg_domain, "detected input format '{}' ({})",
|
||||||
|
input_format->name, input_format->long_name);
|
||||||
|
|
||||||
FfmpegDecode(client, &input, *format_context);
|
FfmpegDecode(client, &input, *format_context);
|
||||||
}
|
}
|
||||||
@ -668,8 +672,12 @@ ffmpeg_uri_decode(DecoderClient &client, const char *uri)
|
|||||||
FfmpegOpenInput(nullptr, uri, nullptr);
|
FfmpegOpenInput(nullptr, uri, nullptr);
|
||||||
|
|
||||||
const auto *input_format = format_context->iformat;
|
const auto *input_format = format_context->iformat;
|
||||||
FmtDebug(ffmpeg_domain, "detected input format '{}' ({})",
|
if (input_format->long_name == nullptr)
|
||||||
input_format->name, input_format->long_name);
|
FmtDebug(ffmpeg_domain, "detected input format '{}'",
|
||||||
|
input_format->name);
|
||||||
|
else
|
||||||
|
FmtDebug(ffmpeg_domain, "detected input format '{}' ({})",
|
||||||
|
input_format->name, input_format->long_name);
|
||||||
|
|
||||||
FfmpegDecode(client, nullptr, *format_context);
|
FfmpegDecode(client, nullptr, *format_context);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user