1
0
Fork 0

avcodec/nvdec_(mjpeg|vp8): Constify AVHWAccels

The discrepancy between the actual definition and the declarations
in hwaccels.h is actually UB.

Reviewed-by: Timo Rothenpieler <timo@rothenpieler.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2023-07-17 22:29:21 +02:00
parent 739f24d833
commit 80cc9b81de
2 changed files with 2 additions and 2 deletions

View File

@ -69,7 +69,7 @@ static int nvdec_mjpeg_frame_params(AVCodecContext *avctx,
return ff_nvdec_frame_params(avctx, hw_frames_ctx, 1, 0);
}
AVHWAccel ff_mjpeg_nvdec_hwaccel = {
const AVHWAccel ff_mjpeg_nvdec_hwaccel = {
.name = "mjpeg_nvdec",
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_MJPEG,

View File

@ -90,7 +90,7 @@ static int nvdec_vp8_frame_params(AVCodecContext *avctx,
return ff_nvdec_frame_params(avctx, hw_frames_ctx, 3, 0);
}
AVHWAccel ff_vp8_nvdec_hwaccel = {
const AVHWAccel ff_vp8_nvdec_hwaccel = {
.name = "vp8_nvdec",
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_VP8,