diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-12-06 14:06:53 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-12-06 14:07:08 +0100 |
commit | db44eff197be05b7423105567dac336f10e18941 (patch) | |
tree | 0caae75a49570df45a67e9b028f0b9d69a210e9b | |
parent | 711c664a0e491a859d951f0d98807ec4327da283 (diff) | |
parent | f51e3a1971045c7ed0c3d9d29d3254a4d940198e (diff) | |
download | ffmpeg-db44eff197be05b7423105567dac336f10e18941.tar.gz |
Merge commit 'f51e3a1971045c7ed0c3d9d29d3254a4d940198e'
* commit 'f51e3a1971045c7ed0c3d9d29d3254a4d940198e':
webp: do not call av_frame_free() on the user-provided frame
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/webp.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/libavcodec/webp.c b/libavcodec/webp.c index a19ab485ee..4f137316df 100644 --- a/libavcodec/webp.c +++ b/libavcodec/webp.c @@ -1129,10 +1129,8 @@ static int vp8_lossless_decode_frame(AVCodecContext *avctx, AVFrame *p, if (is_alpha_chunk) s->image[IMAGE_ROLE_ARGB].is_alpha_primary = 1; ret = decode_entropy_coded_image(s, IMAGE_ROLE_ARGB, w, h); - if (ret < 0) { - av_frame_free(&p); + if (ret < 0) goto free_and_return; - } /* apply transformations */ for (i = s->nb_transforms - 1; i >= 0; i--) { @@ -1150,10 +1148,8 @@ static int vp8_lossless_decode_frame(AVCodecContext *avctx, AVFrame *p, ret = apply_color_indexing_transform(s); break; } - if (ret < 0) { - av_frame_free(&p); + if (ret < 0) goto free_and_return; - } } *got_frame = 1; |