[FFmpeg-devel,6/6] libavutil/: constify values from av_dict_get().
Checks
Context |
Check |
Description |
andriy/configurex86 |
warning
|
Failed to apply patch
|
andriy/configureppc |
warning
|
Failed to apply patch
|
Commit Message
Treat values returned from av_dict_get() as const, since they are
internal to AVDictionary.
Signed-off-by: Chad Fraleigh <chadf@triularity.org>
---
libavutil/hwcontext_qsv.c | 2 +-
libavutil/hwcontext_vulkan.c | 6 +++---
libavutil/opt.c | 6 +++---
3 files changed, 7 insertions(+), 7 deletions(-)
case AV_OPT_TYPE_DICT: {
AVDictionary *dict1 = NULL;
AVDictionary *dict2 = *(AVDictionary **)dst;
- AVDictionaryEntry *en1 = NULL;
- AVDictionaryEntry *en2 = NULL;
+ const AVDictionaryEntry *en1 = NULL;
+ const AVDictionaryEntry *en2 = NULL;
ret = av_dict_parse_string(&dict1, o->default_val.str, "=",
":", 0);
if (ret < 0) {
av_dict_free(&dict1);
@@ -1451,7 +1451,7 @@ static int qsv_device_create(AVHWDeviceContext
*ctx, const char *device,
enum AVHWDeviceType child_device_type;
AVHWDeviceContext *child_device;
AVDictionary *child_device_opts;
- AVDictionaryEntry *e;
+ const AVDictionaryEntry *e;
mfxIMPL impl;
int ret;
@@ -545,7 +545,7 @@ static int check_extensions(AVHWDeviceContext *ctx,
int dev, AVDictionary *opts,
int optional_exts_num;
uint32_t sup_ext_count;
char *user_exts_str = NULL;
- AVDictionaryEntry *user_exts;
+ const AVDictionaryEntry *user_exts;
VkExtensionProperties *sup_ext;
const VulkanOptExtension *optional_exts;
@@ -671,7 +671,7 @@ static int create_instance(AVHWDeviceContext *ctx,
AVDictionary *opts)
VulkanDevicePriv *p = ctx->internal->priv;
VulkanFunctions *vk = &p->vkfn;
AVVulkanDeviceContext *hwctx = ctx->hwctx;
- AVDictionaryEntry *debug_opt = av_dict_get(opts, "debug", NULL, 0);
+ const AVDictionaryEntry *debug_opt = av_dict_get(opts, "debug",
NULL, 0);
const int debug_mode = debug_opt && strtol(debug_opt->value, NULL,
10);
VkApplicationInfo application_info = {
.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO,
@@ -1246,7 +1246,7 @@ static int
vulkan_device_create_internal(AVHWDeviceContext *ctx,
{
int err = 0;
VkResult ret;
- AVDictionaryEntry *opt_d;
+ const AVDictionaryEntry *opt_d;
VulkanDevicePriv *p = ctx->internal->priv;
VulkanFunctions *vk = &p->vkfn;
AVVulkanDeviceContext *hwctx = ctx->hwctx;
@@ -1633,7 +1633,7 @@ void av_opt_free(void *obj)
int av_opt_set_dict2(void *obj, AVDictionary **options, int search_flags)
{
- AVDictionaryEntry *t = NULL;
+ const AVDictionaryEntry *t = NULL;
AVDictionary *tmp = NULL;
int ret;
@@ -2005,8 +2005,8 @@ int av_opt_is_set_to_default(void *obj, const
AVOption *o)