# HG changeset patch # User reimar # Date 1278859911 0 # Node ID 33be6a8f9197854ac17332a649107bba828a7927 # Parent af4d89e131b47348b641cdc4ae1d77423019d7c5 Avoid incorrectly duplicating initialization code in new_demux_packet, just use it directly with a size of 0. diff -r af4d89e131b4 -r 33be6a8f9197 libmpdemux/demux_lavf.c --- a/libmpdemux/demux_lavf.c Sun Jul 11 14:02:58 2010 +0000 +++ b/libmpdemux/demux_lavf.c Sun Jul 11 14:51:51 2010 +0000 @@ -612,13 +612,9 @@ } if(pkt.destruct == av_destruct_packet && !CONFIG_MEMALIGN_HACK){ - dp=malloc(sizeof(demux_packet_t)); + dp=new_demux_packet(0); dp->len=pkt.size; - dp->next=NULL; - dp->refcount=1; - dp->master=NULL; dp->buffer=pkt.data; - dp->stream_pts = MP_NOPTS_VALUE; pkt.destruct= NULL; }else{ dp=new_demux_packet(pkt.size);