diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-09-24 20:01:38 +0000 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-09-24 20:01:38 +0000 |
commit | 120119225a5363f89822addb472085631d2157bc (patch) | |
tree | 93239b90adb673b6bb482ee2fdeb31c5936496c1 | |
parent | 6df40295491a9bcbbbb2d46fb9699cbf712b6c01 (diff) | |
download | ffmpeg-120119225a5363f89822addb472085631d2157bc.tar.gz |
Add missing NULL checks, fix crash.
Originally committed as revision 25181 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavfilter/defaults.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/defaults.c b/libavfilter/defaults.c index 7e44901e4a..cb9ed193ac 100644 --- a/libavfilter/defaults.c +++ b/libavfilter/defaults.c @@ -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)); |