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

@@ -1170,7 +1170,7 @@ static int mpeg_mux_write_packet(AVFormatContext *ctx, AVPacket *pkt)
stream->predecode_packet= pkt_desc;
stream->next_packet= &pkt_desc->next;
av_fifo_realloc(&stream->fifo, av_fifo_size(&stream->fifo) + size + 1);
av_fifo_realloc(&stream->fifo, av_fifo_size(&stream->fifo) + size);
if (s->is_dvd){
if (is_iframe && (s->packet_number == 0 || (pts - stream->vobu_start_pts >= 36000))) { // min VOBU length 0.4 seconds (mpucoder)