changeset 603:0b266c470c96 libavformat

This patch takes into account that fifo_realloc may adjust fifo.wptr patch by ("Chris" chris at garveycocker dot com)
author michael
date Sun, 05 Dec 2004 02:46:00 +0000
parents 15cf78d9aceb
children ed2709c1f49c
files mpeg.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mpeg.c	Wed Dec 01 02:28:28 2004 +0000
+++ b/mpeg.c	Sun Dec 05 02:46:00 2004 +0000
@@ -1172,6 +1172,8 @@
         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 @@
         }
     }
 
-    fifo_realloc(&stream->fifo, fifo_size(&stream->fifo, NULL) + size + 1);
     fifo_write(&stream->fifo, buf, size, &stream->fifo.wptr);
 
     for(;;){