aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNuo Mi <nuomi2021@gmail.com>2024-11-23 17:32:37 +0800
committerNuo Mi <nuomi2021@gmail.com>2024-11-30 09:58:59 +0800
commiteb67e60cb004c17ecbbd43c6e3c6732c19de5d33 (patch)
tree575852b5acea8ce8fab8079bb5b977c16abd5730
parent4ec767abcc1036a424e4b30ef6d0d3b180d4eed4 (diff)
downloadffmpeg-eb67e60cb004c17ecbbd43c6e3c6732c19de5d33.tar.gz
avcodec/vvcdec: schedule next stage only if the current stage reports no error
If the current stage reports an error, some variables may not be correctly initialized. Scheduling the next stage could lead to the use of uninitialized variables.
-rw-r--r--libavcodec/vvc/thread.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/vvc/thread.c b/libavcodec/vvc/thread.c
index f623d6a394..77778f8358 100644
--- a/libavcodec/vvc/thread.c
+++ b/libavcodec/vvc/thread.c
@@ -656,9 +656,9 @@ static void task_run_stage(VVCTask *t, VVCContext *s, VVCLocalContext *lc)
"frame %5d, %s(%3d, %3d) failed with %d\r\n",
(int)fc->decode_order, task_name[stage], t->rx, t->ry, ret);
}
+ if (!ret)
+ task_stage_done(t, s);
}
-
- task_stage_done(t, s);
return;
}