Mercurial > libavcodec.hg
changeset 5186:8a6fac216a2f libavcodec
test context before accessing it
author | benoit |
---|---|
date | Tue, 26 Jun 2007 18:00:50 +0000 |
parents | a81dc8cc24fa |
children | 9968f39d03aa |
files | imgresample.c |
diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/imgresample.c Tue Jun 26 16:09:55 2007 +0000 +++ b/imgresample.c Tue Jun 26 18:00:50 2007 +0000 @@ -643,6 +643,7 @@ 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");