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.
master
Nuo Mi 1 month ago
parent 4ec767abcc
commit eb67e60cb0
  1. 4
      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", "frame %5d, %s(%3d, %3d) failed with %d\r\n",
(int)fc->decode_order, task_name[stage], t->rx, t->ry, ret); (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; return;
} }

Loading…
Cancel
Save