mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
Check that the buffer size speified to avcodec_encode_audio() is not larger than the actual size.
Originally committed as revision 20767 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
060b8592d2
commit
5ee05a62f9
5
ffmpeg.c
5
ffmpeg.c
@ -728,6 +728,11 @@ static void do_audio_out(AVFormatContext *s,
|
||||
if (coded_bps)
|
||||
size_out = size_out*coded_bps/8;
|
||||
|
||||
if(size_out > audio_out_size){
|
||||
fprintf(stderr, "Internal error, buffer size too small\n");
|
||||
av_exit(1);
|
||||
}
|
||||
|
||||
//FIXME pass ost->sync_opts as AVFrame.pts in avcodec_encode_audio()
|
||||
ret = avcodec_encode_audio(enc, audio_out, size_out,
|
||||
(short *)buftmp);
|
||||
|
Loading…
Reference in New Issue
Block a user