diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-04-27 22:21:16 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-05-11 20:16:49 +0200 |
commit | 69cfe63a43f43207f72fd677c47eafcf58fcfd13 (patch) | |
tree | 856cf4fabbfdf18c75bf67470fe01c5566172feb /libavcodec/ffv1.c | |
parent | 44f69c0df8c1d12b450c01ac151d850bf6a8a5b6 (diff) | |
download | ffmpeg-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.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c index cbb1fe8fbc..1b038b11c9 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]; |