]> git.sesse.net Git - ffmpeg/commitdiff
avpacket: properly reset data/size in av_packet_move_ref()
authorAnton Khirnov <anton@khirnov.net>
Thu, 25 Feb 2016 14:53:17 +0000 (15:53 +0100)
committerAnton Khirnov <anton@khirnov.net>
Fri, 26 Feb 2016 08:15:36 +0000 (09:15 +0100)
It currently just calls av_init_packet(), which does not touch those
fields.

libavcodec/avpacket.c

index 3f8e16346726d2380e61907024863110ccfc0b7f..59fc6f29da8daec1ef66f7078d4c936ee489bd59 100644 (file)
@@ -398,6 +398,8 @@ void av_packet_move_ref(AVPacket *dst, AVPacket *src)
 {
     *dst = *src;
     av_init_packet(src);
+    src->data = NULL;
+    src->size = 0;
 }
 
 void av_packet_rescale_ts(AVPacket *pkt, AVRational src_tb, AVRational dst_tb)