提交 12011922 编写于 作者: S Stefano Sabatini

Add missing NULL checks, fix crash.

Originally committed as revision 25181 to svn://svn.ffmpeg.org/ffmpeg/trunk
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册