diff options
author | Martin Storsjö <martin@martin.st> | 2012-07-02 10:39:25 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2012-07-03 12:16:39 +0300 |
commit | 4d8516fdb15d0177ad745228508254dee187dff9 (patch) | |
tree | 12899acb87656cc4dc7158b003c0c979e8bca43a /libavcodec/snowdec.c | |
parent | 4719ea7e1e6113010da2ccdb9a84e45104ab4de7 (diff) | |
download | ffmpeg-4d8516fdb15d0177ad745228508254dee187dff9.tar.gz |
snow: Check mallocs at init
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavcodec/snowdec.c')
-rw-r--r-- | libavcodec/snowdec.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libavcodec/snowdec.c b/libavcodec/snowdec.c index 5dec277eb0..9ea8c493fd 100644 --- a/libavcodec/snowdec.c +++ b/libavcodec/snowdec.c @@ -354,9 +354,14 @@ static int decode_header(SnowContext *s){ static av_cold int decode_init(AVCodecContext *avctx) { + int ret; + avctx->pix_fmt= PIX_FMT_YUV420P; - ff_snow_common_init(avctx); + if ((ret = ff_snow_common_init(avctx)) < 0) { + ff_snow_common_end(avctx->priv_data); + return ret; + } return 0; } |