[FFmpeg-devel] [PATCH 4/6] Revert "avcodec/pngdec: fix possible race condition with APNG decoding"
Paul B Mahol
onemda at gmail.com
Tue Feb 16 22:57:47 EET 2021
Do you have actual proof for such claims?
There is no point in reverting commit if that commit fixed some behavior.
On Tue, Feb 16, 2021 at 9:26 PM Anton Khirnov <anton at khirnov.net> wrote:
> This reverts commit 63231fa8d30f41045658d6c382b00fe1ebe18d05. It did not
> actually fix the cited issue, nor is the issue a race. It will be fixed
> properly in the following commit.
> ---
> libavcodec/pngdec.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
> index e05e44f564..d02c45f1a7 100644
> --- a/libavcodec/pngdec.c
> +++ b/libavcodec/pngdec.c
> @@ -711,13 +711,13 @@ static int decode_idat_chunk(AVCodecContext *avctx,
> PNGDecContext *s,
> s->bpp += byte_depth;
> }
>
> + if ((ret = ff_thread_get_buffer(avctx, &s->picture,
> AV_GET_BUFFER_FLAG_REF)) < 0)
> + return ret;
> if (avctx->codec_id == AV_CODEC_ID_APNG && s->last_dispose_op !=
> APNG_DISPOSE_OP_PREVIOUS) {
> ff_thread_release_buffer(avctx, &s->previous_picture);
> if ((ret = ff_thread_get_buffer(avctx, &s->previous_picture,
> AV_GET_BUFFER_FLAG_REF)) < 0)
> return ret;
> }
> - if ((ret = ff_thread_get_buffer(avctx, &s->picture,
> AV_GET_BUFFER_FLAG_REF)) < 0)
> - return ret;
> p->pict_type = AV_PICTURE_TYPE_I;
> p->key_frame = 1;
> p->interlaced_frame = !!s->interlace_type;
> --
> 2.28.0
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-devel
mailing list