summaryrefslogtreecommitdiff
path: root/libavformat/rtpdec_qt.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-03-08 17:28:42 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-03-08 19:12:03 +0100
commit2653e125204569b1e9439ee2671c6ebb23a94b80 (patch)
tree4176f76bccc8cdd1c85b9d329a82867eda37d397 /libavformat/rtpdec_qt.c
parent532f31a695c9530ce67a847be00d72e6e8acfd11 (diff)
parent1afddbe59e96af75f1c07605afc95615569f388f (diff)
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>
Diffstat (limited to 'libavformat/rtpdec_qt.c')
-rw-r--r--libavformat/rtpdec_qt.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/rtpdec_qt.c b/libavformat/rtpdec_qt.c
index 9631b0ae19..2d2c0fe43b 100644
--- a/libavformat/rtpdec_qt.c
+++ b/libavformat/rtpdec_qt.c
@@ -186,12 +186,14 @@ static int qt_rtp_parse_packet(AVFormatContext *s, PayloadContext *qt,
memcpy(qt->pkt.data + qt->pkt.size, buf + avio_tell(&pb), alen);
qt->pkt.size += alen;
if (has_marker_bit) {
- *pkt = qt->pkt;
+ int ret = av_packet_from_data(pkt, qt->pkt.data, qt->pkt.size);
+ if (ret < 0)
+ return ret;
+
qt->pkt.size = 0;
qt->pkt.data = NULL;
pkt->flags = flags & RTP_FLAG_KEY ? AV_PKT_FLAG_KEY : 0;
pkt->stream_index = st->index;
- pkt->destruct = av_destruct_packet;
memset(pkt->data + pkt->size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
return 0;
}