diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-09-02 20:51:24 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-09-07 00:07:55 +0200 |
commit | ff6f2c558640bcb6ee9f6b17f259645c4193151b (patch) | |
tree | 1f4e1cada39c784cbd7bb27144b7f0df83ae8b2a /libavcodec/ffv1.c | |
parent | 232e88928eee71afa55233d021eeda25eb3ed5b4 (diff) | |
download | ffmpeg-ff6f2c558640bcb6ee9f6b17f259645c4193151b.tar.gz |
avcodec/ffv1: Only allocate ThreadFrames for the decoder
The FFV1 decoder only uses the last frame's data to conceal
errors. The encoder does not have this problem and therefore
only uses the current frame and none of the ThreadFrames.
So only allocate them for the decoder.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/ffv1.c')
-rw-r--r-- | libavcodec/ffv1.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c index c8781cdaaa..b6204740ed 100644 --- a/libavcodec/ffv1.c +++ b/libavcodec/ffv1.c @@ -43,11 +43,6 @@ av_cold int ff_ffv1_common_init(AVCodecContext *avctx) s->avctx = avctx; s->flags = avctx->flags; - s->picture.f = av_frame_alloc(); - s->last_picture.f = av_frame_alloc(); - if (!s->picture.f || !s->last_picture.f) - return AVERROR(ENOMEM); - s->width = avctx->width; s->height = avctx->height; @@ -198,14 +193,6 @@ av_cold int ff_ffv1_close(AVCodecContext *avctx) FFV1Context *s = avctx->priv_data; int i, j; - if (s->picture.f) - ff_thread_release_ext_buffer(avctx, &s->picture); - av_frame_free(&s->picture.f); - - if (s->last_picture.f) - ff_thread_release_ext_buffer(avctx, &s->last_picture); - av_frame_free(&s->last_picture.f); - for (j = 0; j < s->max_slice_count; j++) { FFV1Context *fs = s->slice_context[j]; for (i = 0; i < s->plane_count; i++) { |