avcodec/hevc: Fix invalid null pointer check

c5287178b4 added a null pointer check, but checked the wrong
variable. &s->cur_frame->f->data[c_idx] cannot be null.
This commit is contained in:
Zhao Zhili
2025-08-20 09:46:47 +01:00
committed by James Almer
parent 990edfee5b
commit b8856c5fc5

View File

@@ -2096,7 +2096,7 @@ static void hls_prediction_unit(HEVCLocalContext *lc,
int log2_cb_size, int partIdx, int idx)
{
#define POS(c_idx, x, y) \
&s->cur_frame->f->data[c_idx] ? \
s->cur_frame->f->data[c_idx] ? \
&s->cur_frame->f->data[c_idx][((y) >> sps->vshift[c_idx]) * linesize[c_idx] + \
(((x) >> sps->hshift[c_idx]) << sps->pixel_shift)] : NULL
const HEVCContext *const s = lc->parent;