aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/mxg.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-10-31 08:53:18 +0100
committerAnton Khirnov <anton@khirnov.net>2013-03-08 07:33:45 +0100
commit1afddbe59e96af75f1c07605afc95615569f388f (patch)
tree0e8223d9813de6976ec50dc1a5a7c7bf9a099450 /libavformat/mxg.c
parent1cec0624d0e6f48590283a57169b58b9fe8449d3 (diff)
downloadffmpeg-1afddbe59e96af75f1c07605afc95615569f388f.tar.gz
avpacket: use AVBuffer to allow refcounting the packets.
This will allow us to avoid copying the packets in many cases. This breaks ABI.
Diffstat (limited to 'libavformat/mxg.c')
-rw-r--r--libavformat/mxg.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavformat/mxg.c b/libavformat/mxg.c
index 8959134769..ea54fe2277 100644
--- a/libavformat/mxg.c
+++ b/libavformat/mxg.c
@@ -168,7 +168,10 @@ static int mxg_read_packet(AVFormatContext *s, AVPacket *pkt)
pkt->pts = pkt->dts = mxg->dts;
pkt->stream_index = 0;
+#if FF_API_DESTRUCT_PACKET
pkt->destruct = NULL;
+#endif
+ pkt->buf = NULL;
pkt->size = mxg->buffer_ptr - mxg->soi_ptr;
pkt->data = mxg->soi_ptr;
@@ -206,7 +209,10 @@ static int mxg_read_packet(AVFormatContext *s, AVPacket *pkt)
/* time (GMT) of first sample in usec since 1970, little-endian */
pkt->pts = pkt->dts = AV_RL64(startmarker_ptr + 8);
pkt->stream_index = 1;
+#if FF_API_DESTRUCT_PACKET
pkt->destruct = NULL;
+#endif
+ pkt->buf = NULL;
pkt->size = size - 14;
pkt->data = startmarker_ptr + 16;