lavf/mov: Only copy extradata if it exists.

Avoids undefined call of memcpy(ptr, NULL, 0);
This commit is contained in:
Carl Eugen Hoyos 2017-04-18 10:56:31 +02:00
parent b6a8396245
commit c6aaf0840c
1 changed files with 1 additions and 1 deletions

View File

@ -2321,7 +2321,7 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries)
} else if (a.size > 0)
avio_skip(pb, a.size);
if (sc->extradata) {
if (sc->extradata && st->codecpar->extradata) {
int extra_size = st->codecpar->extradata_size;
/* Move the current stream extradata to the stream context one. */