projects
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f06068b
)
movenc: fix NULL reference in mov_write_tkhd_tag
author
Anton Khirnov
<anton@khirnov.net>
Mon, 19 Sep 2011 13:15:56 +0000
(15:15 +0200)
committer
Anton Khirnov
<anton@khirnov.net>
Mon, 19 Sep 2011 14:44:42 +0000
(16:44 +0200)
st may be NULL when there are more mov streams than AVStreams, e.g. when
chapters are present.
libavformat/movenc.c
patch
|
blob
|
history
diff --git
a/libavformat/movenc.c
b/libavformat/movenc.c
index
88239c5
..
b79bbe8
100644
(file)
--- a/
libavformat/movenc.c
+++ b/
libavformat/movenc.c
@@
-1217,7
+1217,7
@@
static int mov_write_tkhd_tag(AVIOContext *pb, MOVTrack *track, AVStream *st)
avio_wb32(pb, 0); /* reserved */
avio_wb32(pb, 0); /* reserved */
avio_wb16(pb, 0); /* layer */
- avio_wb16(pb, st
->codec->codec_type
); /* alternate group) */
+ avio_wb16(pb, st
? st->codec->codec_type : 0
); /* alternate group) */
/* Volume, only for audio */
if(track->enc->codec_type == AVMEDIA_TYPE_AUDIO)
avio_wb16(pb, 0x0100);