Commit faa1517f authored by michael's avatar michael

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

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


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@3727 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent a341a421
......@@ -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