[FFmpeg-devel] [PATCH] avfilter/f_metadata: correct check for existing metadata

Paul B Mahol onemda at gmail.com
Fri Jan 17 12:22:25 EET 2020


OK if tested and works.

On 1/17/20, Gyan Doshi <ffmpeg at gyani.pro> wrote:
> When adding metadata, existing dictionary need not be present.
> ---
>  libavfilter/f_metadata.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavfilter/f_metadata.c b/libavfilter/f_metadata.c
> index bf298e9d39..598257b15b 100644
> --- a/libavfilter/f_metadata.c
> +++ b/libavfilter/f_metadata.c
> @@ -304,7 +304,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame
> *frame)
>      AVDictionary **metadata = &frame->metadata;
>      AVDictionaryEntry *e;
>
> -    if (!*metadata)
> +    if (!*metadata && s->mode != METADATA_ADD)
>          return ff_filter_frame(outlink, frame);
>
>      e = av_dict_get(*metadata, !s->key ? "" : s->key, NULL,
> --
> 2.24.1
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-devel mailing list