[FFmpeg-cvslog] lavf/mov: Only copy extradata if it exists.
Carl Eugen Hoyos
git at videolan.org
Thu Apr 20 00:38:45 EEST 2017
ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Tue Apr 18 10:56:31 2017 +0200| [c6aaf0840cf9b2b8cb139ed7110d3d47c2bf3d12] | committer: Carl Eugen Hoyos
lavf/mov: Only copy extradata if it exists.
Avoids undefined call of memcpy(ptr, NULL, 0);
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c6aaf0840cf9b2b8cb139ed7110d3d47c2bf3d12
---
libavformat/mov.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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. */
More information about the ffmpeg-cvslog
mailing list