# HG changeset patch # User michael # Date 1274980297 0 # Node ID 92871def02f17b8e5d1a111f69626d84d5b4c0bb # Parent f2241323dca377a6b1e98863540aaaba1e62eba7 Make sure that when the parser is feeded with frame==packet that the packets are passed through and wont be marked as static which would require them to be copied by av_dup_packet(). diff -r f2241323dca3 -r 92871def02f1 utils.c --- a/utils.c Wed May 26 22:26:19 2010 +0000 +++ b/utils.c Thu May 27 17:11:37 2010 +0000 @@ -1044,7 +1044,15 @@ pkt->pts = st->parser->pts; pkt->dts = st->parser->dts; pkt->pos = st->parser->pos; + if(pkt->data == st->cur_pkt.data && pkt->size == st->cur_pkt.size){ + s->cur_st = NULL; + pkt->destruct= st->cur_pkt.destruct; + st->cur_pkt.destruct= + st->cur_pkt.data = NULL; + assert(st->cur_len == 0); + }else{ pkt->destruct = NULL; + } compute_pkt_fields(s, st, st->parser, pkt); if((s->iformat->flags & AVFMT_GENERIC_INDEX) && pkt->flags & AV_PKT_FLAG_KEY){