On Tue, Jun 3, 2014 at 3:21 PM, Diego Biurrun <[email protected]> wrote: >> --- a/libavutil/dict.c >> +++ b/libavutil/dict.c >> @@ -186,7 +186,7 @@ void av_dict_free(AVDictionary **pm) >> >> -void av_dict_copy(AVDictionary **dst, AVDictionary *src, int flags) >> +void av_dict_copy(AVDictionary **dst, const AVDictionary *src, int flags) >> { >> AVDictionaryEntry *t = NULL; >> >> --- a/libavutil/dict.h >> +++ b/libavutil/dict.h >> @@ -141,7 +141,7 @@ int av_dict_parse_string(AVDictionary **pm, const char >> *str, >> * @param flags flags to use when setting entries in *dst >> * @note metadata is read using the AV_DICT_IGNORE_SUFFIX flag >> */ >> -void av_dict_copy(AVDictionary **dst, AVDictionary *src, int flags); >> +void av_dict_copy(AVDictionary **dst, const AVDictionary *src, int flags); > > This looks unrelated.
For the various av_opt_set_* functions that take pointers, all values are const. To keep things consistent, av_opt_set_dict_val also uses a const AVDictionary* as the val, and then passes it to av_dict_copy. To allow that, though, it was necessary to change av_dict_copy to accept a const pointer, or just suffer through a compiler warning or cast. Changing to a const* seemed best. _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
