[FFmpeg-devel] [PATCH 5/8] avcodec/jpeglsenc: Remove redundant av_packet_unref()

Andreas Rheinhardt andreas.rheinhardt at gmail.com
Sat Sep 5 02:17:13 EEST 2020


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(-)

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



More information about the ffmpeg-devel mailing list