[FFmpeg-soc] [soc]: r1422 - libavfilter/avfilter.c
vitor
subversion at mplayerhq.hu
Mon Oct 29 17:00:27 CET 2007
Author: vitor
Date: Mon Oct 29 17:00:27 2007
New Revision: 1422
Log:
Check for error so that
avfilter_open(av_filter_get_by_name(...etc...)) fails
gracefully.
Modified:
libavfilter/avfilter.c
Modified: libavfilter/avfilter.c
==============================================================================
--- libavfilter/avfilter.c (original)
+++ libavfilter/avfilter.c Mon Oct 29 17:00:27 2007
@@ -363,7 +363,12 @@ static const char *filter_name(void *p)
AVFilterContext *avfilter_open(AVFilter *filter, char *inst_name)
{
- AVFilterContext *ret = av_malloc(sizeof(AVFilterContext));
+ AVFilterContext *ret;
+
+ if (!filter)
+ return 0;
+
+ ret = av_malloc(sizeof(AVFilterContext));
ret->av_class = av_mallocz(sizeof(AVClass));
ret->av_class->item_name = filter_name;
More information about the FFmpeg-soc
mailing list