You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avformat/mov: Read the QT Metadata Keys only once
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. Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
committed by
Michael Niedermayer
parent
a7e1af3cb1
commit
1187cbf0ff
@@ -7026,7 +7026,8 @@ static int mov_read_default(MOVContext *c, AVIOContext *pb, MOVAtom atom)
|
|||||||
// https://developer.apple.com/library/mac/documentation/QuickTime/QTFF/Metadata/Metadata.html
|
// https://developer.apple.com/library/mac/documentation/QuickTime/QTFF/Metadata/Metadata.html
|
||||||
if (!parse && c->found_hdlr_mdta &&
|
if (!parse && c->found_hdlr_mdta &&
|
||||||
atom.type == MKTAG('m','e','t','a') &&
|
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;
|
parse = mov_read_keys;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user