diff mbox series

[FFmpeg-devel] lavc/libvpxenc: Fix parsing of ts_layering_mode parameter

Message ID 20240516061036.9528-1-dev@aaront.org
State New
Headers show
Series [FFmpeg-devel] lavc/libvpxenc: Fix parsing of ts_layering_mode parameter | 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

Aaron Thompson May 16, 2024, 6:10 a.m. UTC
The value was being parsed as base 4, so the value "4" was invalid and
would result in ts_layering_mode being set to 0.

Signed-off-by: Aaron Thompson <dev@aaront.org>
---
 libavcodec/libvpxenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

James Zern May 17, 2024, 10:42 p.m. UTC | #1
Hi,

On Wed, May 15, 2024 at 11:11 PM Aaron Thompson via ffmpeg-devel
<ffmpeg-devel@ffmpeg.org> wrote:
>
> The value was being parsed as base 4, so the value "4" was invalid and
> would result in ts_layering_mode being set to 0.
>
> Signed-off-by: Aaron Thompson <dev@aaront.org>
> ---
>  libavcodec/libvpxenc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>

lgtm. Good catch. I applied this with a micro version bump.
diff mbox series

Patch

diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
index bcbdc4981e..5c7b6e9de7 100644
--- a/libavcodec/libvpxenc.c
+++ b/libavcodec/libvpxenc.c
@@ -684,7 +684,7 @@  static int vpx_ts_param_parse(VPxContext *ctx, struct vpx_codec_enc_cfg *enccfg,
         vp8_ts_parse_int_array(enccfg->ts_layer_id, value, value_len, VPX_TS_MAX_PERIODICITY);
     } else if (!strcmp(key, "ts_layering_mode")) {
         /* option for pre-defined temporal structures in function set_temporal_layer_pattern. */
-        ts_layering_mode = strtoul(value, &value, 4);
+        ts_layering_mode = strtoul(value, &value, 10);
     }
 
 #if (VPX_ENCODER_ABI_VERSION >= 12) && CONFIG_LIBVPX_VP9_ENCODER