[FFmpeg-cvslog] r9436 - trunk/libavcodec/imgresample.c
benoit
subversion
Tue Jun 26 20:00:50 CEST 2007
Author: benoit
Date: Tue Jun 26 20:00:50 2007
New Revision: 9436
Log:
test context before accessing it
Modified:
trunk/libavcodec/imgresample.c
Modified: trunk/libavcodec/imgresample.c
==============================================================================
--- trunk/libavcodec/imgresample.c (original)
+++ trunk/libavcodec/imgresample.c Tue Jun 26 20:00:50 2007
@@ -643,6 +643,7 @@ struct SwsContext *sws_getContext(int sr
struct SwsContext *ctx;
ctx = av_malloc(sizeof(struct SwsContext));
+ if (ctx)
ctx->av_class = av_mallocz(sizeof(AVClass));
if (!ctx || !ctx->av_class) {
av_log(NULL, AV_LOG_ERROR, "Cannot allocate a resampling context!\n");
More information about the ffmpeg-cvslog
mailing list