diff mbox series

[FFmpeg-devel,6/7] lavc: drop unused argument from lock_avcodec()

Message ID 20210310120332.27225-6-anton@khirnov.net
State Accepted
Commit 30a69b1625818dda865221c3368155f398540c7b
Headers show
Series [FFmpeg-devel,1/7] lavc: factor out encoder init/validation from avcodec_open2() | expand

Checks

Context Check Description
andriy/configure warning Failed to apply patch

Commit Message

Anton Khirnov March 10, 2021, 12:03 p.m. UTC
---
 libavcodec/utils.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Andreas Rheinhardt March 10, 2021, 12:12 p.m. UTC | #1
Anton Khirnov:
> ---
>  libavcodec/utils.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/libavcodec/utils.c b/libavcodec/utils.c
> index 2545d9234c..e0f6234bd7 100644
> --- a/libavcodec/utils.c
> +++ b/libavcodec/utils.c
> @@ -530,7 +530,7 @@ static int64_t get_bit_rate(AVCodecContext *ctx)
>  }
>  
>  
> -static void lock_avcodec(AVCodecContext *log_ctx, const AVCodec *codec)
> +static void lock_avcodec(const AVCodec *codec)
>  {
>      if (!(codec->caps_internal & FF_CODEC_CAP_INIT_THREADSAFE) && codec->init)
>          ff_mutex_lock(&codec_mutex);
> @@ -570,7 +570,7 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code
>      if (options)
>          av_dict_copy(&tmp, *options, 0);
>  
> -    lock_avcodec(avctx, codec);
> +    lock_avcodec(codec);
>  
>      avci = av_mallocz(sizeof(*avci));
>      if (!avci) {
> @@ -725,7 +725,7 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code
>      if (CONFIG_FRAME_THREAD_ENCODER && av_codec_is_encoder(avctx->codec)) {
>          unlock_avcodec(codec); //we will instantiate a few encoders thus kick the counter to prevent false detection of a problem
>          ret = ff_frame_thread_encoder_init(avctx, options ? *options : NULL);
> -        lock_avcodec(avctx, codec);
> +        lock_avcodec(codec);
>          if (ret < 0)
>              goto free_and_end;
>      }
> 
LGTM.

- Andreas
diff mbox series

Patch

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 2545d9234c..e0f6234bd7 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -530,7 +530,7 @@  static int64_t get_bit_rate(AVCodecContext *ctx)
 }
 
 
-static void lock_avcodec(AVCodecContext *log_ctx, const AVCodec *codec)
+static void lock_avcodec(const AVCodec *codec)
 {
     if (!(codec->caps_internal & FF_CODEC_CAP_INIT_THREADSAFE) && codec->init)
         ff_mutex_lock(&codec_mutex);
@@ -570,7 +570,7 @@  int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code
     if (options)
         av_dict_copy(&tmp, *options, 0);
 
-    lock_avcodec(avctx, codec);
+    lock_avcodec(codec);
 
     avci = av_mallocz(sizeof(*avci));
     if (!avci) {
@@ -725,7 +725,7 @@  int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code
     if (CONFIG_FRAME_THREAD_ENCODER && av_codec_is_encoder(avctx->codec)) {
         unlock_avcodec(codec); //we will instantiate a few encoders thus kick the counter to prevent false detection of a problem
         ret = ff_frame_thread_encoder_init(avctx, options ? *options : NULL);
-        lock_avcodec(avctx, codec);
+        lock_avcodec(codec);
         if (ret < 0)
             goto free_and_end;
     }