[FFmpeg-devel] [PATCH] avcodec/libxvid: add check for invalid intra/inter matrix values
Marton Balint
cus at passwd.hu
Sat Feb 1 22:16:23 EET 2025
On Sat, 25 Jan 2025, Marton Balint wrote:
> Signed-off-by: Marton Balint <cus at passwd.hu>
> ---
> libavcodec/libxvid.c | 4 ++++
> 1 file changed, 4 insertions(+)
Will apply.
Regards,
Marton
>
> diff --git a/libavcodec/libxvid.c b/libavcodec/libxvid.c
> index fbd33b7065..850e691403 100644
> --- a/libavcodec/libxvid.c
> +++ b/libavcodec/libxvid.c
> @@ -617,6 +617,10 @@ static av_cold int xvid_encode_init(AVCodecContext *avctx)
> x->intra_matrix =
> x->inter_matrix = NULL;
>
> + ret = ff_check_codec_matrices(avctx, FF_MATRIX_TYPE_INTRA | FF_MATRIX_TYPE_INTER, 1, 255);
> + if (ret < 0)
> + return ret;
> +
> if (x->mpeg_quant)
> x->vol_flags |= XVID_VOL_MPEGQUANT;
> if ((avctx->intra_matrix || avctx->inter_matrix)) {
> --
> 2.43.0
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
>
More information about the ffmpeg-devel
mailing list