From a569625ce9fd10a2c44086272f66d4d7aaee605d Mon Sep 17 00:00:00 2001 From: Themaister Date: Fri, 23 Mar 2012 23:47:34 +0100 Subject: [PATCH] Do not crash if ffmpeg format cannot be found. --- record/ffemu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/record/ffemu.c b/record/ffemu.c index 414699e97d..879f1e3baf 100644 --- a/record/ffemu.c +++ b/record/ffemu.c @@ -252,6 +252,9 @@ static bool ffemu_init_muxer(ffemu_t *handle) av_strlcpy(ctx->filename, handle->params.filename, sizeof(ctx->filename)); ctx->oformat = av_guess_format(NULL, ctx->filename, NULL); + if (!ctx->oformat) + return false; + // FFmpeg sure likes to make things difficult. #if defined(AVIO_FLAG_WRITE) #define FFMPEG_FLAG_RW AVIO_FLAG_WRITE