Commit 553c1431 authored by James Almer's avatar James Almer

Revert "avcodec/cbs_av1_syntax_template: Check ref_frame_idx before use"

This reverts commit 8174e5c7.

It's no longer needed after the previous commit.
Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent eced91af
...@@ -530,17 +530,16 @@ static int FUNC(frame_size_with_refs)(CodedBitstreamContext *ctx, RWContext *rw, ...@@ -530,17 +530,16 @@ static int FUNC(frame_size_with_refs)(CodedBitstreamContext *ctx, RWContext *rw,
for (i = 0; i < AV1_REFS_PER_FRAME; i++) { for (i = 0; i < AV1_REFS_PER_FRAME; i++) {
flags(found_ref[i], 1, i); flags(found_ref[i], 1, i);
if (current->found_ref[i]) { if (current->found_ref[i]) {
AV1ReferenceFrameState *ref; AV1ReferenceFrameState *ref =
&priv->ref[current->ref_frame_idx[i]];
if (current->ref_frame_idx[i] < 0 || if (!ref->valid) {
!priv->ref[current->ref_frame_idx[i]].valid) {
av_log(ctx->log_ctx, AV_LOG_ERROR, av_log(ctx->log_ctx, AV_LOG_ERROR,
"Missing reference frame needed for frame size " "Missing reference frame needed for frame size "
"(ref = %d, ref_frame_idx = %d).\n", "(ref = %d, ref_frame_idx = %d).\n",
i, current->ref_frame_idx[i]); i, current->ref_frame_idx[i]);
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
} }
ref = &priv->ref[current->ref_frame_idx[i]];
priv->upscaled_width = ref->upscaled_width; priv->upscaled_width = ref->upscaled_width;
priv->frame_width = ref->frame_width; priv->frame_width = ref->frame_width;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment