diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-08-22 20:33:32 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2023-10-26 13:18:01 +0200 |
commit | ba6a5e7a3d4c372a98f910dda7e4d65847eda817 (patch) | |
tree | a44ce357d729911d65d9201cc79c89c1611d9d7e /libavcodec/hevcdec.c | |
parent | 2b300eb533a45c471f09f60885e3c38ed9e5df1b (diff) | |
download | ffmpeg-ba6a5e7a3d4c372a98f910dda7e4d65847eda817.tar.gz |
avcodec/hevcdec: Move collocated_ref to HEVCContext
Only the collocated_ref of the current frame (i.e. HEVCContext.ref)
is ever used*, so move it to HEVCContext directly after ref.
*: This goes so far that collocated_ref was not even synced across
threads in case of frame-threading.
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/hevcdec.c')
-rw-r--r-- | libavcodec/hevcdec.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c index eb881c3ddb..b267f6ebcf 100644 --- a/libavcodec/hevcdec.c +++ b/libavcodec/hevcdec.c @@ -2920,7 +2920,7 @@ static int hevc_frame_start(HEVCContext *s) fail: if (s->ref) ff_hevc_unref_frame(s->ref, ~0); - s->ref = NULL; + s->ref = s->collocated_ref = NULL; return ret; } @@ -3136,7 +3136,7 @@ static int decode_nal_units(HEVCContext *s, const uint8_t *buf, int length) int i, ret = 0; int eos_at_start = 1; - s->ref = NULL; + s->ref = s->collocated_ref = NULL; s->last_eos = s->eos; s->eos = 0; s->overlap = 0; @@ -3351,7 +3351,7 @@ static int hevc_decode_frame(AVCodecContext *avctx, AVFrame *rframe, old, s->dovi_ctx.dv_profile); } - s->ref = NULL; + s->ref = s->collocated_ref = NULL; ret = decode_nal_units(s, avpkt->data, avpkt->size); if (ret < 0) return ret; |