git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9de8e6a
)
test context before accessing it
author
Benoit Fouet
<benoit.fouet@free.fr>
Tue, 26 Jun 2007 18:00:50 +0000
(18:00 +0000)
committer
Benoit Fouet
<benoit.fouet@free.fr>
Tue, 26 Jun 2007 18:00:50 +0000
(18:00 +0000)
Originally committed as revision 9436 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavcodec/imgresample.c
patch
|
blob
|
history
diff --git
a/libavcodec/imgresample.c
b/libavcodec/imgresample.c
index
4ed7e8c
..
f69a5d5
100644
(file)
--- a/
libavcodec/imgresample.c
+++ b/
libavcodec/imgresample.c
@@
-643,6
+643,7
@@
struct SwsContext *sws_getContext(int srcW, int srcH, int srcFormat,
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");