[FFmpeg-devel] [PATCH] lavc/libshroedinger: add missing failure checks in ff_create_shro_frame()
Stefano Sabatini
stefasab at gmail.com
Tue Jun 19 13:08:16 CEST 2012
---
libavcodec/libschroedinger.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/libavcodec/libschroedinger.c b/libavcodec/libschroedinger.c
index 631035e..6ae2adc 100644
--- a/libavcodec/libschroedinger.c
+++ b/libavcodec/libschroedinger.c
@@ -189,7 +189,8 @@ SchroFrame *ff_create_schro_frame(AVCodecContext *avccontext,
uv_height = y_height >> (SCHRO_FRAME_FORMAT_V_SHIFT(schro_frame_fmt));
p_pic = av_mallocz(sizeof(AVPicture));
- avpicture_alloc(p_pic, avccontext->pix_fmt, y_width, y_height);
+ if (!p_pic || avpicture_alloc(p_pic, avccontext->pix_fmt, y_width, y_height) < 0)
+ return NULL;
p_frame = schro_frame_new();
p_frame->format = schro_frame_fmt;
--
1.7.5.4
More information about the ffmpeg-devel
mailing list