Add missing NULL checks, fix crash.
Originally committed as revision 25181 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
6df4029549
commit
120119225a
@ -282,8 +282,8 @@ void avfilter_set_common_formats(AVFilterContext *ctx, AVFilterFormats *formats)
|
|||||||
|
|
||||||
int avfilter_default_query_formats(AVFilterContext *ctx)
|
int avfilter_default_query_formats(AVFilterContext *ctx)
|
||||||
{
|
{
|
||||||
enum AVMediaType type = ctx->inputs [0] ? ctx->inputs [0]->type :
|
enum AVMediaType type = ctx->inputs && ctx->inputs [0] ? ctx->inputs [0]->type :
|
||||||
ctx->outputs[0] ? ctx->outputs[0]->type :
|
ctx->outputs && ctx->outputs[0] ? ctx->outputs[0]->type :
|
||||||
AVMEDIA_TYPE_VIDEO;
|
AVMEDIA_TYPE_VIDEO;
|
||||||
|
|
||||||
avfilter_set_common_formats(ctx, avfilter_all_formats(type));
|
avfilter_set_common_formats(ctx, avfilter_all_formats(type));
|
||||||
|
Loading…
Reference in New Issue
Block a user