mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-06 15:49:50 +08:00
Add missing NULL checks, fix crash.
Originally committed as revision 25181 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@ -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));
|
||||
|
Reference in New Issue
Block a user