[FFmpeg-devel] [PATCH 12/14] avcodec/mjpegenc_common: Use AVCodecContext.codec_id directly

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Wed Dec 22 05:25:12 EET 2021


Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
 libavcodec/mjpegenc_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/mjpegenc_common.c b/libavcodec/mjpegenc_common.c
index ecc21da1b8..e385ea20ed 100644
--- a/libavcodec/mjpegenc_common.c
+++ b/libavcodec/mjpegenc_common.c
@@ -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])
 {
-    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_BGRA
          || avctx->pix_fmt == AV_PIX_FMT_BGR24)) {
-- 
2.32.0



More information about the ffmpeg-devel mailing list