[FFmpeg-cvslog] avcodec/avpacket: clear priv in av_init_packet()
Michael Niedermayer
git at videolan.org
Sun May 1 05:13:47 CEST 2016
ffmpeg | branch: release/2.5 | Michael Niedermayer <michael at niedermayer.cc> | Wed Feb 24 15:48:28 2016 +0100| [0438cc2bc0eeb2371789b5b6a2878674778513a1] | committer: Michael Niedermayer
avcodec/avpacket: clear priv in av_init_packet()
This should fix leaving uninitialized pointers in priv which can confuse
user applications.
See: https://github.com/golang/go/issues/14426
Only or release branches
Reviewed-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0438cc2bc0eeb2371789b5b6a2878674778513a1
---
libavcodec/avpacket.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavcodec/avpacket.c b/libavcodec/avpacket.c
index 3c26046..03332ac 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;
More information about the ffmpeg-cvslog
mailing list