Commit 98e42a24 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/format: Check for av_guess_format() failure

Fixes null pointer dereference
Fixes Ticket3812
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 26ffa8ea
......@@ -145,7 +145,9 @@ enum AVCodecID av_guess_codec(AVOutputFormat *fmt, const char *short_name,
enum AVMediaType type)
{
if (av_match_name("segment", fmt->name) || av_match_name("ssegment", fmt->name)) {
fmt = av_guess_format(NULL, filename, NULL);
AVOutputFormat *fmt2 = av_guess_format(NULL, filename, NULL);
if (fmt2)
fmt = fmt2;
}
if (type == AVMEDIA_TYPE_VIDEO) {
......
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