summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYusuke Nakamura <muken.the.vfrmaniac@gmail.com>2018-02-14 11:43:24 +0900
committerJames Almer <jamrial@gmail.com>2018-02-14 20:36:29 -0300
commit3b4026e15110547892d5d770b6b43c9e34df458f (patch)
tree77be1b0e6a3c957d7fcc89eed92b070c41757ccb
parent7c82e0f61e365296b094684fd92aea0fe05ceb93 (diff)
downloadffmpeg-streaming-3b4026e15110547892d5d770b6b43c9e34df458f.zip
ffmpeg-streaming-3b4026e15110547892d5d770b6b43c9e34df458f.tar.gz
avpacket: reset dst side_data fields in av_packet_copy_props
This effectively copies the side data elements from src instead of potentially merging them with those already existing in dst. This by extension also removes the only dependency on existing values in the dst packet. Reviewed-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r--libavcodec/avpacket.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/avpacket.c b/libavcodec/avpacket.c
index 90b8215..fe8113a 100644
--- a/libavcodec/avpacket.c
+++ b/libavcodec/avpacket.c
@@ -571,6 +571,8 @@ FF_ENABLE_DEPRECATION_WARNINGS
dst->flags = src->flags;
dst->stream_index = src->stream_index;
+ dst->side_data = NULL;
+ dst->side_data_elems = 0;
for (i = 0; i < src->side_data_elems; i++) {
enum AVPacketSideDataType type = src->side_data[i].type;
int size = src->side_data[i].size;
OpenPOWER on IntegriCloud