aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/mov.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2017-04-18 10:56:31 +0200
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2017-04-19 23:33:47 +0200
commitc6aaf0840cf9b2b8cb139ed7110d3d47c2bf3d12 (patch)
treec7bed49f8e67488cfd5dac6e93475d458e8794b5 /libavformat/mov.c
parentb6a83962453463aa814bb79aeaa7145732158f02 (diff)
downloadffmpeg-c6aaf0840cf9b2b8cb139ed7110d3d47c2bf3d12.tar.gz
lavf/mov: Only copy extradata if it exists.
Avoids undefined call of memcpy(ptr, NULL, 0);
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r--libavformat/mov.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 2995a009a8..03fd90e3d3 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -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. */