[FFmpeg-devel] [PATCH] lavc/pngdec: always create a copy for APNG_DISPOSE_OP_BACKGROUND

Michael Niedermayer michael at niedermayer.cc
Thu Apr 8 18:34:30 EEST 2021


On Thu, Apr 08, 2021 at 10:46:54AM +0200, Anton Khirnov wrote:
> Calling av_frame_make_writable() from decoders is tricky, especially
> when frame threading is used. It is much simpler and safer to just make
> a private copy of the frame.
> This is not expected to have a major performance impact, since
> APNG_DISPOSE_OP_BACKGROUND is not used often and
> av_frame_make_writable() would typically make a copy anyway.
> 
> Found-by: James Almer <jamrial at gmail.com>
> ---
>  libavcodec/pngdec.c | 18 +++++++++++-------
>  1 file changed, 11 insertions(+), 7 deletions(-)

LGTM

thx

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Breaking DRM is a little like attempting to break through a door even
though the window is wide open and the only thing in the house is a bunch
of things you dont want and which you would get tomorrow for free anyway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20210408/01d11163/attachment.sig>


More information about the ffmpeg-devel mailing list