diff options
author | Anton Khirnov <anton@khirnov.net> | 2016-02-25 15:53:17 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2016-02-26 09:15:36 +0100 |
commit | dbb43b8b83b097585ec255ec638b61e359ebea77 (patch) | |
tree | ed97354f751268ac030cd082d4378a5446cda0b6 /libavcodec | |
parent | ba357e98691ee4fe1a503b8830c0050be4127475 (diff) | |
download | ffmpeg-dbb43b8b83b097585ec255ec638b61e359ebea77.tar.gz |
avpacket: properly reset data/size in av_packet_move_ref()
It currently just calls av_init_packet(), which does not touch those
fields.
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/avpacket.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/avpacket.c b/libavcodec/avpacket.c index 3f8e163467..59fc6f29da 100644 --- a/libavcodec/avpacket.c +++ b/libavcodec/avpacket.c @@ -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) |