diff options
author | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-10-17 00:54:13 +0000 |
---|---|---|
committer | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-10-17 00:54:13 +0000 |
commit | 60c8189dd92322e2426c19795e82724f0b996e2a (patch) | |
tree | afb173a876ae321b13d037c159900c0be6e7d3b7 /libmpdemux | |
parent | 4293eebe3074f56d8b7c82b45f0a1a01a2b0cbdb (diff) |
fill the extra bytes with zero
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7777 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r-- | libmpdemux/demuxer.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libmpdemux/demuxer.h b/libmpdemux/demuxer.h index 422bdf466e..3a08927a1b 100644 --- a/libmpdemux/demuxer.h +++ b/libmpdemux/demuxer.h @@ -130,13 +130,14 @@ typedef struct demuxer_st { inline static demux_packet_t* new_demux_packet(int len){ demux_packet_t* dp=(demux_packet_t*)malloc(sizeof(demux_packet_t)); dp->len=len; - dp->buffer=len?(unsigned char*)malloc(len+8):NULL; dp->next=NULL; dp->pts=0; dp->pos=0; dp->flags=0; dp->refcount=1; dp->master=NULL; + dp->buffer=len?(unsigned char*)malloc(len+8):NULL; + if(len) memset(dp->buffer+len,0,8); return dp; } |