qsvenc: mark the encoders as INIT_CLEANUP
authorAnton Khirnov <anton@khirnov.net>
Wed, 5 Aug 2015 11:42:08 +0000 (13:42 +0200)
committerAnton Khirnov <anton@khirnov.net>
Mon, 28 Sep 2015 13:43:04 +0000 (15:43 +0200)
Should fix some leaks on init failure.

libavcodec/qsvenc_h264.c
libavcodec/qsvenc_hevc.c
libavcodec/qsvenc_mpeg2.c

index 7399dc7..93a3b1a 100644 (file)
@@ -118,4 +118,5 @@ AVCodec ff_h264_qsv_encoder = {
                                                     AV_PIX_FMT_NONE },
     .priv_class     = &class,
     .defaults       = qsv_enc_defaults,
+    .caps_internal  = FF_CODEC_CAP_INIT_CLEANUP,
 };
index be60871..7577743 100644 (file)
@@ -269,4 +269,5 @@ AVCodec ff_hevc_qsv_encoder = {
                                                     AV_PIX_FMT_NONE },
     .priv_class     = &class,
     .defaults       = qsv_enc_defaults,
+    .caps_internal  = FF_CODEC_CAP_INIT_CLEANUP,
 };
index 3601036..ed7c23e 100644 (file)
@@ -114,4 +114,5 @@ AVCodec ff_mpeg2_qsv_encoder = {
                                                     AV_PIX_FMT_NONE },
     .priv_class     = &class,
     .defaults       = qsv_enc_defaults,
+    .caps_internal  = FF_CODEC_CAP_INIT_CLEANUP,
 };