[FFmpeg-cvslog] Release old pictures after a resolution change in vp5/6 decoder
Laurent Aimar
git at videolan.org
Thu Sep 22 00:43:17 CEST 2011
ffmpeg | branch: master | Laurent Aimar <fenrir at videolan.org> | Wed Sep 21 20:46:33 2011 +0200| [dba20b84784a7931b7eac50ced1d43e86801bde9] | committer: Michael Niedermayer
Release old pictures after a resolution change in vp5/6 decoder
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dba20b84784a7931b7eac50ced1d43e86801bde9
---
libavcodec/vp56.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/libavcodec/vp56.c b/libavcodec/vp56.c
index f3ffa44..c3cfbe2 100644
--- a/libavcodec/vp56.c
+++ b/libavcodec/vp56.c
@@ -515,6 +515,16 @@ int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
if (!res)
return -1;
+ if (res == 2) {
+ int i;
+ for (i = 0; i < 4; i++) {
+ if (s->frames[i].data[0])
+ avctx->release_buffer(avctx, &s->frames[i]);
+ }
+ if (is_alpha)
+ return -1;
+ }
+
if (!is_alpha) {
p->reference = 1;
if (avctx->get_buffer(avctx, p) < 0) {
More information about the ffmpeg-cvslog
mailing list