summaryrefslogtreecommitdiff
path: root/libavformat/rtpdec_qt.c
diff options
context:
space:
mode:
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 6350507fc2..1222b4590d 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;
}