[FFmpeg-cvslog] avformat/movenc: Write version 2 of audio atom if channels is not known
Michael Niedermayer
git at videolan.org
Mon Jul 16 21:33:17 EEST 2018
ffmpeg | branch: release/3.3 | Michael Niedermayer <michael at niedermayer.cc> | Sun Jul 8 00:16:42 2018 +0200| [87ddf73e52b412ee015108ec2f1aaac7a05c947f] | committer: Michael Niedermayer
avformat/movenc: Write version 2 of audio atom if channels is not known
The version 1 needs the channel count and would divide by 0
Fixes: division by 0
Fixes: fpe_movenc.c_1108_1.ogg
Fixes: fpe_movenc.c_1108_2.ogg
Fixes: fpe_movenc.c_1108_3.wav
Found-by: #CHEN HONGXU# <HCHEN017 at e.ntu.edu.sg>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit fa19fbcf712a6a6cc5a5cfdc3254a97b9bce6582)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=87ddf73e52b412ee015108ec2f1aaac7a05c947f
---
libavformat/movenc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index b36322837e..cf3d969547 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -937,7 +937,7 @@ static int mov_write_audio_tag(AVFormatContext *s, AVIOContext *pb, MOVMuxContex
uint32_t tag = track->tag;
if (track->mode == MODE_MOV) {
- if (track->timescale > UINT16_MAX) {
+ if (track->timescale > UINT16_MAX || !track->par->channels) {
if (mov_get_lpcm_flags(track->par->codec_id))
tag = AV_RL32("lpcm");
version = 2;
More information about the ffmpeg-cvslog
mailing list