summaryrefslogtreecommitdiff
path: root/libavcodec/dv.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/dv.c')
-rw-r--r--libavcodec/dv.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/dv.c b/libavcodec/dv.c
index 2d89a3cce7..32d4c3a271 100644
--- a/libavcodec/dv.c
+++ b/libavcodec/dv.c
@@ -580,6 +580,9 @@ static int dvvideo_decode_frame(AVCodecContext *avctx,
else
avctx->aspect_ratio = 4.0 / 3.0;
+ if(s->picture.data[0])
+ avctx->release_buffer(avctx, &s->picture);
+
s->picture.reference= 0;
if(avctx->get_buffer(avctx, &s->picture) < 0) {
fprintf(stderr, "get_buffer() failed\n");
@@ -617,8 +620,6 @@ static int dvvideo_decode_frame(AVCodecContext *avctx,
*data_size = sizeof(AVFrame);
*(AVFrame*)data= s->picture;
- avctx->release_buffer(avctx, &s->picture);
-
return packet_size;
}