diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-10-05 23:31:37 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-10-06 00:17:33 +0200 |
commit | 02f7665a3ce703217ae1cbbc7baa29c438d61456 (patch) | |
tree | 5b0ed13ea51ee04299048eb5ad486aa3a95c81af | |
parent | fb7d8d50bc242c739dad42e4f4a6b98bb3f1eee6 (diff) | |
download | ffmpeg-02f7665a3ce703217ae1cbbc7baa29c438d61456.tar.gz |
avformat/mov: do not overwrite extradata in mov_read_glbl()
Fixes regression from Ticket3962
This basically favors the first global header while since 34751f8313a41bf94e004ffa9491f35d96763558
it was the last. If this heuristic turns out worse, do not hesitate to revert this and
reopen 3962 as a feature request for multiple STSD
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/mov.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index 8070b4d0c3..fdd0671a42 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1099,6 +1099,10 @@ static int mov_read_glbl(MOVContext *c, AVIOContext *pb, MOVAtom atom) if (type == MKTAG('f','i','e','l') && size == atom.size) return mov_read_default(c, pb, atom); } + if (st->codec->extradata_size > 1 && st->codec->extradata) { + av_log(c, AV_LOG_WARNING, "ignoring multiple glbl\n"); + return 0; + } av_free(st->codec->extradata); if (ff_get_extradata(st->codec, pb, atom.size) < 0) return AVERROR(ENOMEM); |