diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-02-24 15:48:28 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-02-24 16:56:12 +0100 |
commit | 800334947d9509bfd270dfad7c5421ae20639a64 (patch) | |
tree | 1a0af96ec8497d6e833fa6484b5a6137ec3edf7c | |
parent | 4ccb97650a94a5ea3a73c0c91fbef860dcd4423f (diff) | |
download | ffmpeg-800334947d9509bfd270dfad7c5421ae20639a64.tar.gz |
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 for release branches
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/avpacket.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/avpacket.c b/libavcodec/avpacket.c index 10be9d53b8..ad0a7d795e 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; |