[FFmpeg-devel] [PATCH] [libavformat/mov.c] Read the QT Metadata Keys only once
Thierry Foucu
tfoucu at gmail.com
Thu May 14 02:06:37 EEST 2020
On Mon, May 11, 2020 at 9:35 AM Thierry Foucu <tfoucu at gmail.com> wrote:
> If you have a file with multiple Metadata Keys, the second time you parse
> the keys, you will re-alloc c->meta_keys without freeing the old one.
> This change will avoid parsing all the consecutive Metadata keys.
> ---
> libavformat/mov.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/libavformat/mov.c b/libavformat/mov.c
> index ad718cdaa2..062a62d93b 100644
> --- a/libavformat/mov.c
> +++ b/libavformat/mov.c
> @@ -7022,7 +7022,8 @@ static int mov_read_default(MOVContext *c,
> AVIOContext *pb, MOVAtom atom)
> //
> https://developer.apple.com/library/mac/documentation/QuickTime/QTFF/Metadata/Metadata.html
> if (!parse && c->found_hdlr_mdta &&
> atom.type == MKTAG('m','e','t','a') &&
> - a.type == MKTAG('k','e','y','s')) {
> + a.type == MKTAG('k','e','y','s') &&
> + c->meta_keys_count == 0) {
> parse = mov_read_keys;
> }
>
> --
> 2.26.2.526.g744177e7f7-goog
>
>
ping?
Thanks
--
Thierry Foucu
More information about the ffmpeg-devel
mailing list