fill the extra bytes with zero

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7777 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi 2002-10-17 00:54:13 +00:00
parent 4293eebe30
commit 60c8189dd9
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}