OSDN Git Service

jpeglsenc: Mark codec as init-thread-safe and init-cleanup
authorVittorio Giovara <vittorio.giovara@gmail.com>
Fri, 24 Apr 2015 15:59:33 +0000 (16:59 +0100)
committerVittorio Giovara <vittorio.giovara@gmail.com>
Tue, 28 Apr 2015 15:29:29 +0000 (16:29 +0100)
Fixes a memory leak on init failure.

libavcodec/jpeglsenc.c

index 2a24a5d..839b540 100644 (file)
@@ -452,4 +452,6 @@ AVCodec ff_jpegls_encoder = {
         AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY16,
         AV_PIX_FMT_NONE
     },
+    .caps_internal  = FF_CODEC_CAP_INIT_THREADSAFE |
+                      FF_CODEC_CAP_INIT_CLEANUP,
 };