---
libavformat/mux.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/libavformat/mux.c b/libavformat/mux.c
index e86d202..bdcc38c 100644
--- a/libavformat/mux.c
+++ b/libavformat/mux.c
@@ -416,12 +416,9 @@ int ff_interleave_add_packet(AVFormatContext *s, AVPacket
*pkt,
this_pktl = av_mallocz(sizeof(AVPacketList));
if (!this_pktl)
return AVERROR(ENOMEM);
- this_pktl->pkt = *pkt;
- pkt->buf = NULL;
- pkt->side_data = NULL;
- pkt->side_data_elems = 0;
+
// Duplicate the packet if it uses non-allocated memory
- if ((ret = av_dup_packet(&this_pktl->pkt)) < 0) {
+ if ((ret = av_packet_ref(&this_pktl->pkt, pkt)) < 0) {
av_free(this_pktl);
return ret;
}
--
2.5.0
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel