]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/libsvtav1.c
avcodec/libsvtav1: remove unneeded svt_av1_enc_deinit_handle()
[ffmpeg] / libavcodec / libsvtav1.c
index 40942c6f6ad74b9a0993f972376192c372bc68f5..eb6043bcac3ee80d0f95341915c1cdb733c1cd2a 100644 (file)
@@ -85,7 +85,7 @@ static const struct {
     { EB_ErrorBadParameter,               AVERROR(EINVAL),      "bad parameter"             },
     { EB_ErrorDestroyThreadFailed,        AVERROR_EXTERNAL,     "failed to destroy thread"  },
     { EB_ErrorSemaphoreUnresponsive,      AVERROR_EXTERNAL,     "semaphore unresponsive"    },
-    { EB_ErrorDestroySemaphoreFailed,     AVERROR_EXTERNAL,     "semaphore unresponsive"    },
+    { EB_ErrorDestroySemaphoreFailed,     AVERROR_EXTERNAL,     "failed to destroy semaphore"},
     { EB_ErrorCreateMutexFailed,          AVERROR_EXTERNAL,     "failed to create mutex"    },
     { EB_ErrorMutexUnresponsive,          AVERROR_EXTERNAL,     "mutex unresponsive"        },
     { EB_ErrorDestroyMutexFailed,         AVERROR_EXTERNAL,     "failed to destroy mutex"   },
@@ -273,23 +273,17 @@ static av_cold int eb_enc_init(AVCodecContext *avctx)
 
     ret = config_enc_params(&svt_enc->enc_params, avctx);
     if (ret < 0) {
-        svt_av1_enc_deinit_handle(svt_enc->svt_handle);
-        svt_enc->svt_handle = NULL;
         av_log(avctx, AV_LOG_ERROR, "Error configuring encoder parameters\n");
         return ret;
     }
 
     svt_ret = svt_av1_enc_set_parameter(svt_enc->svt_handle, &svt_enc->enc_params);
     if (svt_ret != EB_ErrorNone) {
-        svt_av1_enc_deinit_handle(svt_enc->svt_handle);
-        svt_enc->svt_handle = NULL;
         return svt_print_error(avctx, svt_ret, "Error setting encoder parameters");
     }
 
     svt_ret = svt_av1_enc_init(svt_enc->svt_handle);
     if (svt_ret != EB_ErrorNone) {
-        svt_av1_enc_deinit_handle(svt_enc->svt_handle);
-        svt_enc->svt_handle = NULL;
         return svt_print_error(avctx, svt_ret, "Error initializing encoder");
     }