diff libmpdemux/demux_viv.c @ 27282:16beae919ff1

Avoid including avcodec.h in demuxer.h (and thus many other files) just to get FF_INPUT_BUFFER_PADDING_SIZE. Instead use MP_INPUT_BUFFER_PADDING_SIZE and add a preprocessor check that it is big enough.
author reimar
date Thu, 17 Jul 2008 17:14:12 +0000
parents 21e634c01f9f
children d643e4643313
line wrap: on
line diff
--- a/libmpdemux/demux_viv.c	Thu Jul 17 17:11:30 2008 +0000
+++ b/libmpdemux/demux_viv.c	Thu Jul 17 17:14:12 2008 +0000
@@ -378,10 +378,10 @@
       } else {
         // append data to it!
         demux_packet_t* dp=ds->asf_packet;
-        if(dp->len + len + FF_INPUT_BUFFER_PADDING_SIZE < 0)
+        if(dp->len + len + MP_INPUT_BUFFER_PADDING_SIZE < 0)
 	    return 0;
-        dp->buffer=realloc(dp->buffer,dp->len+len+FF_INPUT_BUFFER_PADDING_SIZE);
-        memset(dp->buffer+dp->len+len, 0, FF_INPUT_BUFFER_PADDING_SIZE);
+        dp->buffer=realloc(dp->buffer,dp->len+len+MP_INPUT_BUFFER_PADDING_SIZE);
+        memset(dp->buffer+dp->len+len, 0, MP_INPUT_BUFFER_PADDING_SIZE);
         //memcpy(dp->buffer+dp->len,data,len);
 	stream_read(demux->stream,dp->buffer+dp->len,len);
         mp_dbg(MSGT_DEMUX,MSGL_DBG4,"data appended! %d+%d\n",dp->len,len);