avcodec/mjpegenc_common: Use AVCodecContext.codec_id directly

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2021-12-22 03:41:48 +01:00
parent 3867b18120
commit cbbd5e063d
1 changed files with 1 additions and 1 deletions

View File

@ -188,7 +188,7 @@ static void jpeg_put_comments(AVCodecContext *avctx, PutBitContext *p)
void ff_mjpeg_init_hvsample(AVCodecContext *avctx, int hsample[4], int vsample[4]) void ff_mjpeg_init_hvsample(AVCodecContext *avctx, int hsample[4], int vsample[4])
{ {
if (avctx->codec->id == AV_CODEC_ID_LJPEG && if (avctx->codec_id == AV_CODEC_ID_LJPEG &&
( avctx->pix_fmt == AV_PIX_FMT_BGR0 ( avctx->pix_fmt == AV_PIX_FMT_BGR0
|| avctx->pix_fmt == AV_PIX_FMT_BGRA || avctx->pix_fmt == AV_PIX_FMT_BGRA
|| avctx->pix_fmt == AV_PIX_FMT_BGR24)) { || avctx->pix_fmt == AV_PIX_FMT_BGR24)) {