summaryrefslogtreecommitdiffstats
path: root/libmpdemux/demux_asf.c
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-07-17 17:14:12 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-07-17 17:14:12 +0000
commit4153f4e21c26703a6cc68ed33be9f90365788816 (patch)
treeb1b066a7530f29055506d8b06d60b53196c58faa /libmpdemux/demux_asf.c
parent6dfb85dc9ec79ec10e073e317566cfc0fbffb319 (diff)
downloadmpv-4153f4e21c26703a6cc68ed33be9f90365788816.tar.bz2
mpv-4153f4e21c26703a6cc68ed33be9f90365788816.tar.xz
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. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27314 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/demux_asf.c')
-rw-r--r--libmpdemux/demux_asf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libmpdemux/demux_asf.c b/libmpdemux/demux_asf.c
index 3dc18d920c..518d08d220 100644
--- a/libmpdemux/demux_asf.c
+++ b/libmpdemux/demux_asf.c
@@ -54,9 +54,9 @@ static void asf_descrambling(unsigned char **src,unsigned len, struct asf_priv*
unsigned char *dst;
unsigned char *s2=*src;
unsigned i=0,x,y;
- if (len > UINT_MAX - FF_INPUT_BUFFER_PADDING_SIZE)
+ if (len > UINT_MAX - MP_INPUT_BUFFER_PADDING_SIZE)
return;
- dst = malloc(len + FF_INPUT_BUFFER_PADDING_SIZE);
+ dst = malloc(len + MP_INPUT_BUFFER_PADDING_SIZE);
while(len>=asf->scrambling_h*asf->scrambling_w*asf->scrambling_b+i){
// mp_msg(MSGT_DEMUX,MSGL_DBG4,"descrambling! (w=%d b=%d)\n",w,asf_scrambling_b);
//i+=asf_scrambling_h*asf_scrambling_w;
@@ -86,9 +86,9 @@ static void init_priv (struct asf_priv* asf){
static void demux_asf_append_to_packet(demux_packet_t* dp,unsigned char *data,int len,int offs)
{
if(dp->len!=offs && offs!=-1) mp_msg(MSGT_DEMUX,MSGL_V,"warning! fragment.len=%d BUT next fragment offset=%d \n",dp->len,offs);
- dp->buffer=realloc(dp->buffer,dp->len+len+FF_INPUT_BUFFER_PADDING_SIZE);
+ dp->buffer=realloc(dp->buffer,dp->len+len+MP_INPUT_BUFFER_PADDING_SIZE);
fast_memcpy(dp->buffer+dp->len,data,len);
- memset(dp->buffer+dp->len+len, 0, FF_INPUT_BUFFER_PADDING_SIZE);
+ memset(dp->buffer+dp->len+len, 0, MP_INPUT_BUFFER_PADDING_SIZE);
mp_dbg(MSGT_DEMUX,MSGL_DBG4,"data appended! %d+%d\n",dp->len,len);
dp->len+=len;
}