]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/jpeglsenc: Remove redundant av_packet_unref()
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Thu, 3 Sep 2020 17:44:44 +0000 (19:44 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Sat, 5 Sep 2020 13:40:12 +0000 (15:40 +0200)
If encoding fails, the AVPacket that ought to contain the encoded packet
is already unreferenced generically.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavcodec/jpeglsenc.c

index 5ecd430db7520522a8d79d2eec9696225ef48bf4..0725457a94ce5a5a64423dba019961a53b0f9049 100644 (file)
@@ -418,7 +418,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
     return 0;
 
 memfail:
-    av_packet_unref(pkt);
     av_freep(&buf2);
     av_freep(&state);
     av_freep(&zero);