mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-03 05:10:03 +02:00
avcodec/cbs_h266: use VVC_MAX_VPS_COUNT for range checks and array size
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
3fd7841ef1
commit
96d6990517
@ -775,7 +775,7 @@ typedef struct CodedBitstreamH266Context {
|
||||
AVBufferRef *sps_ref[VVC_MAX_SPS_COUNT];
|
||||
AVBufferRef *pps_ref[VVC_MAX_PPS_COUNT];
|
||||
AVBufferRef *ph_ref;
|
||||
H266RawVPS *vps[VVC_MAX_SPS_COUNT];
|
||||
H266RawVPS *vps[VVC_MAX_VPS_COUNT];
|
||||
H266RawSPS *sps[VVC_MAX_SPS_COUNT];
|
||||
H266RawPPS *pps[VVC_MAX_PPS_COUNT];
|
||||
H266RawPictureHeader *ph;
|
||||
|
@ -639,12 +639,7 @@ static int FUNC(vps) (CodedBitstreamContext *ctx, RWContext *rw,
|
||||
CHECK(FUNC(nal_unit_header) (ctx, rw,
|
||||
¤t->nal_unit_header, VVC_VPS_NUT));
|
||||
|
||||
ub(4, vps_video_parameter_set_id);
|
||||
if (current->vps_video_parameter_set_id == 0) {
|
||||
av_log(ctx->log_ctx, AV_LOG_ERROR,
|
||||
"vps_video_parameter_set_id should > 0.\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
u(4, vps_video_parameter_set_id, 1, VVC_MAX_VPS_COUNT - 1);
|
||||
ub(6, vps_max_layers_minus1);
|
||||
u(3, vps_max_sublayers_minus1, 0, 6);
|
||||
if (current->vps_max_layers_minus1 > 0
|
||||
|
Loading…
Reference in New Issue
Block a user