This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 51caa26a8675480955b761453fd64b2ca12c62cb Author: Ramiro Polla <[email protected]> AuthorDate: Wed Sep 24 23:30:57 2025 +0200 Commit: Ramiro Polla <[email protected]> CommitDate: Fri Feb 20 16:32:10 2026 +0100 avcodec/mjpegdec: move initialization of last_dc field to mjpeg_decode_scan() The last_dc field is only used in sequential JPEG and the DC coefficients for progressive JPEG. --- libavcodec/mjpegdec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index f54e11c828..42b034140d 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -1503,6 +1503,9 @@ static int mjpeg_decode_scan(MJpegDecodeContext *s, int nb_components, int Ah, s->coefs_finished[c] |= 1; } + for (i = 0; i < nb_components; i++) + s->last_dc[i] = (4 << s->bits); + for (mb_y = 0; mb_y < s->mb_height; mb_y++) { for (mb_x = 0; mb_x < s->mb_width; mb_x++) { const int copy_mb = mb_bitmask && !get_bits1(&mb_bitmask_gb); @@ -1779,9 +1782,6 @@ int ff_mjpeg_decode_sos(MJpegDecodeContext *s, const uint8_t *mb_bitmask, return ret; next_field: - for (i = 0; i < nb_components; i++) - s->last_dc[i] = (4 << s->bits); - if (s->avctx->hwaccel) { int bytes_to_start = bytestream2_tell(&s->gB); av_assert0(bytes_to_start >= 0 && _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
