comparison libmpdemux/demuxer.h @ 7776:75c5762e7b55

fill the extra bytes with zero
author arpi
date Thu, 17 Oct 2002 00:54:13 +0000
parents 18f7389bc822
children 2b39ff3860b7
comparison
equal deleted inserted replaced
7775:87c94fd5719f 7776:75c5762e7b55
128 } demuxer_t; 128 } demuxer_t;
129 129
130 inline static demux_packet_t* new_demux_packet(int len){ 130 inline static demux_packet_t* new_demux_packet(int len){
131 demux_packet_t* dp=(demux_packet_t*)malloc(sizeof(demux_packet_t)); 131 demux_packet_t* dp=(demux_packet_t*)malloc(sizeof(demux_packet_t));
132 dp->len=len; 132 dp->len=len;
133 dp->buffer=len?(unsigned char*)malloc(len+8):NULL;
134 dp->next=NULL; 133 dp->next=NULL;
135 dp->pts=0; 134 dp->pts=0;
136 dp->pos=0; 135 dp->pos=0;
137 dp->flags=0; 136 dp->flags=0;
138 dp->refcount=1; 137 dp->refcount=1;
139 dp->master=NULL; 138 dp->master=NULL;
139 dp->buffer=len?(unsigned char*)malloc(len+8):NULL;
140 if(len) memset(dp->buffer+len,0,8);
140 return dp; 141 return dp;
141 } 142 }
142 143
143 inline static demux_packet_t* clone_demux_packet(demux_packet_t* pack){ 144 inline static demux_packet_t* clone_demux_packet(demux_packet_t* pack){
144 demux_packet_t* dp=(demux_packet_t*)malloc(sizeof(demux_packet_t)); 145 demux_packet_t* dp=(demux_packet_t*)malloc(sizeof(demux_packet_t));