On Tue, Jun 03, 2014 at 02:25:19PM -0400, Andrew Stone wrote:
> Exporting icecast metadata as an option with name "metadata" so that it can be
> pulled more easily. Also adding a dict type to AVOption to allow for easier
> export of metadata (as suggested here:
> https://lists.libav.org/pipermail/libav-devel/2014-May/060016.html).
Drop the gerunds and no need to repeat the title in the log message body.
> --- a/libavformat/http.c
> +++ b/libavformat/http.c
> @@ -810,9 +838,13 @@ static int store_icy(URLContext *h, int size)
> if (ret < 0)
> return ret;
> data[len + 1] = 0;
> +
> if ((ret = av_opt_set(s, "icy_metadata_packet", data, 0)) < 0)
> return ret;
> +
> + update_metadata(s, data);
> }
> +
> s->icy_data_read = 0;
Drop the stray empty line additions.
> --- 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.
> --- a/libavutil/opt.c
> +++ b/libavutil/opt.c
> @@ -621,9 +657,22 @@ int av_set_options_string(void *ctx, const char *opts,
> void av_opt_free(void *obj)
> {
> const AVOption *o = NULL;
> - while ((o = av_opt_next(obj, o)))
> - if (o->type == AV_OPT_TYPE_STRING || o->type == AV_OPT_TYPE_BINARY)
> - av_freep((uint8_t *)obj + o->offset);
> + while ((o = av_opt_next(obj, o))) {
> + switch (o->type) {
> + case AV_OPT_TYPE_STRING:
Indent case labels on the same level as the switch.
Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel