This should fix leaving uninitialized pointers in priv which can confuse
user applications.
See: https://github.com/golang/go/issues/14426

Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc>
---
 libavcodec/avpacket.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/avpacket.c b/libavcodec/avpacket.c
index 10be9d5..ad0a7d7 100644
--- a/libavcodec/avpacket.c
+++ b/libavcodec/avpacket.c
@@ -58,6 +58,7 @@ void av_init_packet(AVPacket *pkt)
 #if FF_API_DESTRUCT_PACKET
 FF_DISABLE_DEPRECATION_WARNINGS
     pkt->destruct             = NULL;
+    pkt->priv                 = NULL;
 FF_ENABLE_DEPRECATION_WARNINGS
 #endif
     pkt->buf                  = NULL;
-- 
1.7.9.5

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to