avformat/movenc: Check input sample count
Fixes: division by 0
Fixes: fpe_movenc.c_199_1.wav
Fixes: fpe_movenc.c_199_2.wav
Fixes: fpe_movenc.c_199_3.wav
Fixes: fpe_movenc.c_199_4.wav
Fixes: fpe_movenc.c_199_5.wav
Fixes: fpe_movenc.c_199_6.wav
Fixes: fpe_movenc.c_199_7.wav
Found-by: #CHEN HONGXU# <HCHEN017@e.ntu.edu.sg>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 3a2d21bc5f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
64993b613b
commit
3571bec56e
1 changed files with 5 additions and 0 deletions
|
|
@ -4785,6 +4785,11 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt)
|
|||
else
|
||||
samples_in_chunk = 1;
|
||||
|
||||
if (samples_in_chunk < 1) {
|
||||
av_log(s, AV_LOG_ERROR, "fatal error, input packet contains no samples\n");
|
||||
return AVERROR_PATCHWELCOME;
|
||||
}
|
||||
|
||||
/* copy extradata if it exists */
|
||||
if (trk->vos_len == 0 && par->extradata_size > 0 &&
|
||||
!TAG_IS_AVCI(trk->tag) &&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue