[FFmpeg-devel] [PATCH v2 1/7] libavcodec/qsvenc: skip parameter resetting on mjpeg_qsv

Wenbin Chen wenbin.chen at intel.com
Tue Sep 6 12:22:52 EEST 2022


mjpeg_qsv don't support dynamic resetting, so skip it.

Signed-off-by: Wenbin Chen <wenbin.chen at intel.com>
---
 libavcodec/qsvenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
index 7ac5390f10..842cfb845e 100644
--- a/libavcodec/qsvenc.c
+++ b/libavcodec/qsvenc.c
@@ -1680,7 +1680,7 @@ static int update_parameters(AVCodecContext *avctx, QSVEncContext *q,
 {
     int needReset = 0, ret = 0;
 
-    if (!frame)
+    if (!frame || avctx->codec_id == AV_CODEC_ID_MJPEG)
         return 0;
 
     needReset = update_qp(avctx, q);
-- 
2.32.0



More information about the ffmpeg-devel mailing list