summaryrefslogtreecommitdiff
path: root/libavformat/yop.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2013-09-19 16:49:48 +0300
committerMartin Storsjö <martin@martin.st>2013-09-19 22:46:21 +0300
commitd8b68660145c76a23fc9665f96932449514ecad2 (patch)
tree4bc41f8ee267d51f55a62aa4a4fb07ad056c1f64 /libavformat/yop.c
parent3185a80259ce1f8f8111073dbd14a69a396e03a3 (diff)
downloadffmpeg-d8b68660145c76a23fc9665f96932449514ecad2.tar.gz
yop: Clear all references to the AVBuffer in the local AVPacket
This makes sure that it doesn't try to free an AVBuffer belonging to an earlier packet when we free the local packet at the end. Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/yop.c')
-rw-r--r--libavformat/yop.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavformat/yop.c b/libavformat/yop.c
index 5fe6bdc7d4..8caeb07157 100644
--- a/libavformat/yop.c
+++ b/libavformat/yop.c
@@ -127,6 +127,12 @@ static int yop_read_packet(AVFormatContext *s, AVPacket *pkt)
if (yop->video_packet.data) {
*pkt = yop->video_packet;
yop->video_packet.data = NULL;
+ yop->video_packet.buf = NULL;
+#if FF_API_DESTRUCT_PACKET
+FF_DISABLE_DEPRECATION_WARNINGS
+ yop->video_packet.destruct = NULL;
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
yop->video_packet.size = 0;
pkt->data[0] = yop->odd_frame;
pkt->flags |= AV_PKT_FLAG_KEY;