[FFmpeg-cvslog] r12024 - trunk/libavfilter/avfilter.c
vitor
subversion
Fri Feb 15 22:39:13 CET 2008
Author: vitor
Date: Fri Feb 15 22:39:12 2008
New Revision: 12024
Log:
Check for error so that
avfilter_open(av_filter_get_by_name(...etc...)) fails
gracefully.
Commited in SoC by Vitor Sessak on 2007-10-29 16:00:27
Modified:
trunk/libavfilter/avfilter.c
Modified: trunk/libavfilter/avfilter.c
==============================================================================
--- trunk/libavfilter/avfilter.c (original)
+++ trunk/libavfilter/avfilter.c Fri Feb 15 22:39:12 2008
@@ -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-cvslog
mailing list