Commit 20b02bc6 authored by Chriss's avatar Chriss Committed by Michael Niedermayer

This patch takes into account that fifo_realloc may adjust fifo.wptr

patch by ("Chris" chris at garveycocker dot com)

Originally committed as revision 3727 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 0d712409
......@@ -1172,6 +1172,8 @@ static int mpeg_mux_write_packet(AVFormatContext *ctx, AVPacket *pkt)
stream->predecode_packet= pkt_desc;
stream->next_packet= &pkt_desc->next;
fifo_realloc(&stream->fifo, fifo_size(&stream->fifo, NULL) + size + 1);
if (s->is_dvd){
if (is_iframe) {
stream->fifo_iframe_ptr = stream->fifo.wptr;
......@@ -1181,7 +1183,6 @@ static int mpeg_mux_write_packet(AVFormatContext *ctx, AVPacket *pkt)
}
}
fifo_realloc(&stream->fifo, fifo_size(&stream->fifo, NULL) + size + 1);
fifo_write(&stream->fifo, buf, size, &stream->fifo.wptr);
for(;;){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment