This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 09ab2d18ed2e58f949a6b1a534540023df9961b1 Author: Michael Niedermayer <[email protected]> AuthorDate: Thu Feb 19 03:19:34 2026 +0100 Commit: Michael Niedermayer <[email protected]> CommitDate: Mon Mar 2 19:01:46 2026 +0100 avcodec/snowdec: fix mconly Fixes non repeatable checksums This also avoids allocating the mc only buffer when its not used Signed-off-by: Michael Niedermayer <[email protected]> --- libavcodec/snow.c | 2 +- libavcodec/snowdec.c | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/libavcodec/snow.c b/libavcodec/snow.c index 094b893c96..b2850356ef 100644 --- a/libavcodec/snow.c +++ b/libavcodec/snow.c @@ -540,7 +540,7 @@ int ff_snow_common_init_after_header(AVCodecContext *avctx) { int plane_index, level, orientation; if(!s->scratchbuf) { - if (!FF_ALLOCZ_TYPED_ARRAY(s->scratchbuf, FFMAX(s->mconly_picture->linesize[0], 2*avctx->width+256) * 7 * MB_SIZE)) + if (!FF_ALLOCZ_TYPED_ARRAY(s->scratchbuf, FFMAX(s->current_picture->linesize[0], 2*avctx->width+256) * 7 * MB_SIZE)) return AVERROR(ENOMEM); } diff --git a/libavcodec/snowdec.c b/libavcodec/snowdec.c index c16e824c73..aaf01295a5 100644 --- a/libavcodec/snowdec.c +++ b/libavcodec/snowdec.c @@ -605,14 +605,16 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *picture, if ((res = decode_header(s)) < 0) return res; - if (!s->mconly_picture->data[0]) { + if (avctx->debug & 2048) { + av_frame_unref(s->mconly_picture); res = ff_get_buffer(avctx, s->mconly_picture, AV_GET_BUFFER_FLAG_REF); if (res < 0) return res; } - if (s->mconly_picture->format != avctx->pix_fmt) { + + if (s->current_picture->data[0] && s->current_picture->format != avctx->pix_fmt) { av_log(avctx, AV_LOG_ERROR, "pixel format changed\n"); - return AVERROR_INVALIDDATA; + return AVERROR_PATCHWELCOME; } if ((res=ff_snow_common_init_after_header(avctx)) < 0) _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
