diff options
author | Diego Biurrun <diego@biurrun.de> | 2012-05-22 13:50:23 +0200 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2012-05-22 14:01:56 +0200 |
commit | cc7fac9970c61f764cc9ca2a263c11fb1497dd28 (patch) | |
tree | 955920662475a227f067453180c9bd2af037faa3 /libavcodec/snowdec.c | |
parent | c89e428ed8c2c31396af2d18cab4342b7d82958f (diff) | |
download | ffmpeg-cc7fac9970c61f764cc9ca2a263c11fb1497dd28.tar.gz |
dwt: return errors from ff_slice_buffer_init()
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 ef5205d972..62ef5f11f4 100644 --- a/libavcodec/snowdec.c +++ b/libavcodec/snowdec.c @@ -396,7 +396,12 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac // realloc slice buffer for the case that spatial_decomposition_count changed ff_slice_buffer_destroy(&s->sb); - ff_slice_buffer_init(&s->sb, s->plane[0].height, (MB_SIZE >> s->block_max_depth) + s->spatial_decomposition_count * 8 + 1, s->plane[0].width, s->spatial_idwt_buffer); + if ((res = ff_slice_buffer_init(&s->sb, s->plane[0].height, + (MB_SIZE >> s->block_max_depth) + + s->spatial_decomposition_count * 8 + 1, + s->plane[0].width, + s->spatial_idwt_buffer)) < 0) + return res; for(plane_index=0; plane_index<3; plane_index++){ Plane *p= &s->plane[plane_index]; |