Merge commit '1afddbe59e96af75f1c07605afc95615569f388f'

* commit '1afddbe59e96af75f1c07605afc95615569f388f':
  avpacket: use AVBuffer to allow refcounting the packets.

Conflicts:
	libavcodec/avpacket.c
	libavcodec/utils.c
	libavdevice/v4l2.c
	libavformat/avidec.c
	libavformat/flacdec.c
	libavformat/id3v2.c
	libavformat/matroskaenc.c
	libavformat/mux.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer
2013-03-08 17:28:42 +01:00
24 changed files with 362 additions and 207 deletions

View File

@@ -864,11 +864,15 @@ int ff_parse_fmtp(AVStream *stream, PayloadContext *data, const char *p,
int ff_rtp_finalize_packet(AVPacket *pkt, AVIOContext **dyn_buf, int stream_idx)
{
int ret;
av_init_packet(pkt);
pkt->size = avio_close_dyn_buf(*dyn_buf, &pkt->data);
pkt->stream_index = stream_idx;
pkt->destruct = av_destruct_packet;
*dyn_buf = NULL;
*dyn_buf = NULL;
if ((ret = av_packet_from_data(pkt, pkt->data, pkt->size)) < 0) {
av_freep(&pkt->data);
return ret;
}
return pkt->size;
}