[MPlayer-dev-eng] [PATCH] 1 memcpy less in lavf demuxer
Michael Niedermayer
michaelni at gmx.at
Tue Jun 22 23:36:39 CEST 2010
Hi
I possibly posted something like this previously, but i couldnt find it and
it seems not in svn.
This makes the lavf demuxer memcpy() free for non static packets
Ive lightly tested it and it works, more testing highly recommanded
as i will apply in a few days if there are no replies against doing
so
Index: libmpdemux/demux_lavf.c
===================================================================
--- libmpdemux/demux_lavf.c (revision 31528)
+++ libmpdemux/demux_lavf.c (working copy)
@@ -612,14 +612,14 @@
return 1;
}
- if(0/*pkt.destruct == av_destruct_packet*/){
- //ok kids, dont try this at home :)
+ if(pkt.destruct == av_destruct_packet){
dp=malloc(sizeof(demux_packet_t));
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);
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Observe your enemies, for they first find out your faults. -- Antisthenes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20100622/a8786996/attachment.pgp>
More information about the MPlayer-dev-eng
mailing list