From e3580f60775c897c3b13b178c57ab191ecc4a031 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Sun, 15 May 2022 19:32:44 +0200 Subject: avformat/hls, dashdec: Don't use AV_OPT flags in av_dict_set() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit av_dict_set() expects a different set of flags, namely the AV_DICT_* flags. Using AV_OPT_FLAG_DECODING_PARAM (or any AV_OPT_FLAG_*) ic av_dict_set() is therefore completely wrong and given that av_dict_set() just doesn't care about whether the string it receives has anything to do with a decoding parameter or not, it should just be removed without replacement. (The numerical value of AV_OPT_FLAG_DECODING_PARAM currently coincides with AV_DICT_IGNORE_SUFFIX. Given that the dictionaries we are dealing with here are always empty (i.e. NULL) before the calls to av_dict_set(), this flag changes nothing. It would be different if it were equal to one of the AV_DICT_DONT_STRDUP_* values.) Reviewed-by: Jan Ekström Signed-off-by: Andreas Rheinhardt --- libavformat/hls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavformat/hls.c') diff --git a/libavformat/hls.c b/libavformat/hls.c index 38eb346405..8204f55df3 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -2065,7 +2065,7 @@ static int hls_read_header(AVFormatContext *s) if (strstr(in_fmt->name, "mov")) { char key[33]; ff_data_to_hex(key, pls->key, sizeof(pls->key), 0); - av_dict_set(&options, "decryption_key", key, AV_OPT_FLAG_DECODING_PARAM); + av_dict_set(&options, "decryption_key", key, 0); } else if (!c->crypto_ctx.aes_ctx) { c->crypto_ctx.aes_ctx = av_aes_alloc(); if (!c->crypto_ctx.aes_ctx) { -- cgit v1.2.3