Ensure that one can store X bytes in a fifo of size X.

Fixed issue417.

Originally committed as revision 13405 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer
2008-05-25 23:04:09 +00:00
parent 0871ae1a93
commit fa3b98182d
4 changed files with 6 additions and 5 deletions

View File

@ -587,7 +587,7 @@ static void do_audio_out(AVFormatContext *s,
/* now encode as many frames as possible */
if (enc->frame_size > 1) {
/* output resampled raw samples */
av_fifo_realloc(&ost->fifo, av_fifo_size(&ost->fifo) + size_out + 1);
av_fifo_realloc(&ost->fifo, av_fifo_size(&ost->fifo) + size_out);
av_fifo_write(&ost->fifo, buftmp, size_out);
frame_bytes = enc->frame_size * 2 * enc->channels;