[FFmpeg-devel] [PATCH 5/8] avcodec/jpeglsenc: Remove redundant av_packet_unref()
Paul B Mahol
onemda at gmail.com
Sat Sep 5 11:36:50 EEST 2020
On Sat, Sep 05, 2020 at 01:17:13AM +0200, Andreas Rheinhardt wrote:
> If encoding fails, the AVPacket that ought to contain the encoded packet
> is already unreferenced generically.
>
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
> ---
> libavcodec/jpeglsenc.c | 1 -
> 1 file changed, 1 deletion(-)
>
lgtm
> diff --git a/libavcodec/jpeglsenc.c b/libavcodec/jpeglsenc.c
> index d05fe4564b..b1e54431e9 100644
> --- a/libavcodec/jpeglsenc.c
> +++ b/libavcodec/jpeglsenc.c
> @@ -431,7 +431,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
> return 0;
>
> memfail:
> - av_packet_unref(pkt);
> av_freep(&buf2);
> av_freep(&state);
> av_freep(&last);
> --
> 2.20.1
>
> _______________________________________________
> 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