diff options
author | Yusuke Nakamura <muken.the.vfrmaniac@gmail.com> | 2018-02-14 05:43:24 +0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2018-02-15 02:36:29 +0300 |
commit | 3b4026e15110547892d5d770b6b43c9e34df458f (patch) | |
tree | 77be1b0e6a3c957d7fcc89eed92b070c41757ccb /libavcodec/avpacket.c | |
parent | 7c82e0f61e365296b094684fd92aea0fe05ceb93 (diff) |
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>
Diffstat (limited to 'libavcodec/avpacket.c')
-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 90b8215928..fe8113ab76 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; |