On Fri,  8 May 2015 15:43:11 +0100
Vittorio Giovara <[email protected]> wrote:

> From: wm4 <[email protected]>
> 
> APIC tags always have a description. Tag writers obviously leave it
> empty if there is no description. In this case, libavformat would export
> "" as title. Do not set the title instead.
> ---
>  libavformat/id3v2.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c
> index a8273e2..1c57dd9 100644
> --- a/libavformat/id3v2.c
> +++ b/libavformat/id3v2.c
> @@ -1082,7 +1082,8 @@ int ff_id3v2_parse_apic(AVFormatContext *s, 
> ID3v2ExtraMeta **extra_meta)
>          st->disposition      |= AV_DISPOSITION_ATTACHED_PIC;
>          st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
>          st->codec->codec_id   = apic->id;
> -        av_dict_set(&st->metadata, "title",   apic->description, 0);
> +        if (apic->description[0])
> +            av_dict_set(&st->metadata, "title", apic->description, 0);
>          av_dict_set(&st->metadata, "comment", apic->type, 0);
>  
>          av_init_packet(&st->attached_pic);

There was another patch that was not merged:

https://ffmpeg.org/pipermail/ffmpeg-devel/2015-May/172857.html

what do you think? (Personally, I think it's rather questionable. But
on the other hand it's inconvenient for users, and I'm trying to avoid
format-specific hacks in generic code.)
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to