diff mbox series

[FFmpeg-devel,v2,05/31] avcodec/libvpxenc: use av_dict_iterate

Message ID 20221126144648.73162-6-epirat07@gmail.com
State New
Headers show
Series Use av_dict_iterate where approproate | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Marvin Scholz Nov. 26, 2022, 2:46 p.m. UTC
---
 libavcodec/libvpxenc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

James Zern Nov. 30, 2022, 8:18 p.m. UTC | #1
On Sat, Nov 26, 2022 at 6:47 AM Marvin Scholz <epirat07@gmail.com> wrote:
>
> ---
>  libavcodec/libvpxenc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>

lgtm.

> diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
> index 667cffc200..9aa5510c28 100644
> --- a/libavcodec/libvpxenc.c
> +++ b/libavcodec/libvpxenc.c
> @@ -900,7 +900,7 @@ static av_cold int vpx_init(AVCodecContext *avctx,
>      vpx_codec_caps_t codec_caps = vpx_codec_get_caps(iface);
>      vpx_svc_extra_cfg_t svc_params;
>  #endif
> -    AVDictionaryEntry* en = NULL;
> +    const AVDictionaryEntry* en = NULL;
>
>      av_log(avctx, AV_LOG_INFO, "%s\n", vpx_codec_version_str());
>      av_log(avctx, AV_LOG_VERBOSE, "%s\n", vpx_codec_build_config());
> @@ -1072,7 +1072,7 @@ static av_cold int vpx_init(AVCodecContext *avctx,
>
>      enccfg.g_error_resilient = ctx->error_resilient || ctx->flags & VP8F_ERROR_RESILIENT;
>
> -    while ((en = av_dict_get(ctx->vpx_ts_parameters, "", en, AV_DICT_IGNORE_SUFFIX))) {
> +    while ((en = av_dict_iterate(ctx->vpx_ts_parameters, en))) {
>          if (vpx_ts_param_parse(ctx, &enccfg, en->key, en->value, avctx->codec_id) < 0)
>              av_log(avctx, AV_LOG_WARNING,
>                     "Error parsing option '%s = %s'.\n",
> --
> 2.37.0 (Apple Git-136)
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
diff mbox series

Patch

diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
index 667cffc200..9aa5510c28 100644
--- a/libavcodec/libvpxenc.c
+++ b/libavcodec/libvpxenc.c
@@ -900,7 +900,7 @@  static av_cold int vpx_init(AVCodecContext *avctx,
     vpx_codec_caps_t codec_caps = vpx_codec_get_caps(iface);
     vpx_svc_extra_cfg_t svc_params;
 #endif
-    AVDictionaryEntry* en = NULL;
+    const AVDictionaryEntry* en = NULL;
 
     av_log(avctx, AV_LOG_INFO, "%s\n", vpx_codec_version_str());
     av_log(avctx, AV_LOG_VERBOSE, "%s\n", vpx_codec_build_config());
@@ -1072,7 +1072,7 @@  static av_cold int vpx_init(AVCodecContext *avctx,
 
     enccfg.g_error_resilient = ctx->error_resilient || ctx->flags & VP8F_ERROR_RESILIENT;
 
-    while ((en = av_dict_get(ctx->vpx_ts_parameters, "", en, AV_DICT_IGNORE_SUFFIX))) {
+    while ((en = av_dict_iterate(ctx->vpx_ts_parameters, en))) {
         if (vpx_ts_param_parse(ctx, &enccfg, en->key, en->value, avctx->codec_id) < 0)
             av_log(avctx, AV_LOG_WARNING,
                    "Error parsing option '%s = %s'.\n",