[FFmpeg-cvslog] r23352 - trunk/libavformat/utils.c
michael
subversion
Thu May 27 19:11:37 CEST 2010
Author: michael
Date: Thu May 27 19:11:37 2010
New Revision: 23352
Log:
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().
Modified:
trunk/libavformat/utils.c
Modified: trunk/libavformat/utils.c
==============================================================================
--- trunk/libavformat/utils.c Thu May 27 16:50:19 2010 (r23351)
+++ trunk/libavformat/utils.c Thu May 27 19:11:37 2010 (r23352)
@@ -1044,7 +1044,15 @@ static int av_read_frame_internal(AVForm
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){
More information about the ffmpeg-cvslog
mailing list