0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 20:03:10 +02:00

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

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