summaryrefslogtreecommitdiffstats
path: root/libavcodec/ffv1.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-04-27 22:21:16 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-05-11 20:16:49 +0200
commit69cfe63a43f43207f72fd677c47eafcf58fcfd13 (patch)
tree856cf4fabbfdf18c75bf67470fe01c5566172feb /libavcodec/ffv1.c
parent44f69c0df8c1d12b450c01ac151d850bf6a8a5b6 (diff)
downloadffmpeg-streaming-69cfe63a43f43207f72fd677c47eafcf58fcfd13.zip
ffmpeg-streaming-69cfe63a43f43207f72fd677c47eafcf58fcfd13.tar.gz
ffv1: Switch to ThreadFrame
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ffv1.c')
-rw-r--r--libavcodec/ffv1.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c
index cbb1fe8..1b038b1 100644
--- a/libavcodec/ffv1.c
+++ b/libavcodec/ffv1.c
@@ -49,8 +49,8 @@ av_cold int ffv1_common_init(AVCodecContext *avctx)
s->avctx = avctx;
s->flags = avctx->flags;
- avcodec_get_frame_defaults(&s->picture);
-
+ s->picture.f = avcodec_alloc_frame();
+ s->last_picture.f = av_frame_alloc();
ff_dsputil_init(&s->dsp, avctx);
s->width = avctx->width;
@@ -192,7 +192,13 @@ av_cold int ffv1_close(AVCodecContext *avctx)
FFV1Context *s = avctx->priv_data;
int i, j;
- av_frame_unref(&s->last_picture);
+ if (s->picture.f)
+ ff_thread_release_buffer(avctx, &s->picture);
+ av_frame_free(&s->picture.f);
+
+ if (s->last_picture.f)
+ ff_thread_release_buffer(avctx, &s->last_picture);
+ av_frame_free(&s->last_picture.f);
for (j = 0; j < s->slice_count; j++) {
FFV1Context *fs = s->slice_context[j];
OpenPOWER on IntegriCloud