Browse Source

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
tags/v0.5
Chriss Michael Niedermayer 21 years ago
parent
commit
20b02bc628
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavformat/mpeg.c

+ 2
- 1
libavformat/mpeg.c View File

@@ -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(;;){


Loading…
Cancel
Save