Commit 12011922 authored by Stefano Sabatini's avatar Stefano Sabatini
Browse files

Add missing NULL checks, fix crash.

Originally committed as revision 25181 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 6df40295
......@@ -282,8 +282,8 @@ void avfilter_set_common_formats(AVFilterContext *ctx, AVFilterFormats *formats)
int avfilter_default_query_formats(AVFilterContext *ctx)
{
enum AVMediaType type = ctx->inputs [0] ? ctx->inputs [0]->type :
ctx->outputs[0] ? ctx->outputs[0]->type :
enum AVMediaType type = ctx->inputs && ctx->inputs [0] ? ctx->inputs [0]->type :
ctx->outputs && ctx->outputs[0] ? ctx->outputs[0]->type :
AVMEDIA_TYPE_VIDEO;
avfilter_set_common_formats(ctx, avfilter_all_formats(type));
......
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