[FFmpeg-devel] [PATCH] avcodec/mjpegdec: remove unused parameter from ff_mjpeg_decode_frame_from_buf

James Almer jamrial at gmail.com
Mon Jul 1 21:57:00 EEST 2024


Signed-off-by: James Almer <jamrial at gmail.com>
---
 libavcodec/mjpegdec.c | 4 ++--
 libavcodec/mjpegdec.h | 2 +-
 libavcodec/sp5xdec.c  | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 7daec649bc..ace25af90e 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -2368,7 +2368,7 @@ static void reset_icc_profile(MJpegDecodeContext *s)
 }
 
 int ff_mjpeg_decode_frame_from_buf(AVCodecContext *avctx, AVFrame *frame,
-                                   int *got_frame, const AVPacket *avpkt,
+                                   int *got_frame,
                                    const uint8_t *buf, const int buf_size)
 {
     MJpegDecodeContext *s = avctx->priv_data;
@@ -2926,7 +2926,7 @@ int ff_mjpeg_decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame,
                           AVPacket *avpkt)
 {
     return ff_mjpeg_decode_frame_from_buf(avctx, frame, got_frame,
-                                          avpkt, avpkt->data, avpkt->size);
+                                          avpkt->data, avpkt->size);
 }
 
 
diff --git a/libavcodec/mjpegdec.h b/libavcodec/mjpegdec.h
index 13c524d597..6c34761cde 100644
--- a/libavcodec/mjpegdec.h
+++ b/libavcodec/mjpegdec.h
@@ -176,7 +176,7 @@ int ff_mjpeg_decode_frame(AVCodecContext *avctx,
                           AVPacket *avpkt);
 int ff_mjpeg_decode_frame_from_buf(AVCodecContext *avctx,
                                    AVFrame *frame, int *got_frame,
-                                   const AVPacket *avpkt, const uint8_t *buf, int buf_size);
+                                   const uint8_t *buf, int buf_size);
 int ff_mjpeg_decode_dqt(MJpegDecodeContext *s);
 int ff_mjpeg_decode_dht(MJpegDecodeContext *s);
 int ff_mjpeg_decode_sof(MJpegDecodeContext *s);
diff --git a/libavcodec/sp5xdec.c b/libavcodec/sp5xdec.c
index 8dda5b6152..6b9723b4c2 100644
--- a/libavcodec/sp5xdec.c
+++ b/libavcodec/sp5xdec.c
@@ -86,7 +86,7 @@ static int sp5x_decode_frame(AVCodecContext *avctx,
     recoded[j++] = 0xD9;
 
     ret = ff_mjpeg_decode_frame_from_buf(avctx, frame, got_frame,
-                                         avpkt, recoded, j);
+                                         recoded, j);
 
     av_free(recoded);
 
-- 
2.45.2



More information about the ffmpeg-devel mailing list