Re: [FFmpeg-devel] [PATCH 1/2] avcodec/mjpegdec: Fix av_frame_unref(NULL)

2024-06-12 Thread Michael Niedermayer
On Thu, Jun 13, 2024 at 04:02:52AM +0200, Andreas Rheinhardt wrote: > The smv_frame is only allocated for the SMV decoder, yet > it is unreferenced in the other decoders' flush functions, too. > av_frame_unref(NULL) is not documented to be allowed, it just > happens to work. Avoid it by using a ded

[FFmpeg-devel] [PATCH 1/2] avcodec/mjpegdec: Fix av_frame_unref(NULL)

2024-06-12 Thread Andreas Rheinhardt
The smv_frame is only allocated for the SMV decoder, yet it is unreferenced in the other decoders' flush functions, too. av_frame_unref(NULL) is not documented to be allowed, it just happens to work. Avoid it by using a dedicated flush function for SMV. Signed-off-by: Andreas Rheinhardt --- liba