Commited in SoC by Vitor Sessak on 2007-10-29 16:00:27 Originally committed as revision 12024 to svn://svn.ffmpeg.org/ffmpeg/trunk
Unified · Split
| @@ -363,7 +363,12 @@ static const char *filter_name(void *p) · 362 unmodified lines | |||
| 363 | 363 | ||
| 364 | AVFilterContext *avfilter_open(AVFilter *filter, char *inst_name) | 364 | AVFilterContext *avfilter_open(AVFilter *filter, char *inst_name) |
| 365 | { | 365 | { |
| 366 | AVFilterContext *ret = av_malloc(sizeof(AVFilterContext)); | 366 | AVFilterContext *ret; |
| 367 | |||
| 368 | if (!filter) | ||
| 369 | return 0; | ||
| 370 | |||
| 371 | ret = av_malloc(sizeof(AVFilterContext)); | ||
| 367 | 372 | ||
| 368 | ret->av_class = av_mallocz(sizeof(AVClass)); | 373 | ret->av_class = av_mallocz(sizeof(AVClass)); |
| 369 | ret->av_class->item_name = filter_name; | 374 | ret->av_class->item_name = filter_name; |