Commit 551f6838 authored by Michael Niedermayer's avatar Michael Niedermayer

yop: Do not keep a copy of parts of the returned packet

Fixes double free
Regression since the new buffer references, thus no FFmpeg
releases should be affected

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 6ae03353
...@@ -135,8 +135,7 @@ static int yop_read_packet(AVFormatContext *s, AVPacket *pkt) ...@@ -135,8 +135,7 @@ static int yop_read_packet(AVFormatContext *s, AVPacket *pkt)
if (yop->video_packet.data) { if (yop->video_packet.data) {
*pkt = yop->video_packet; *pkt = yop->video_packet;
yop->video_packet.data = NULL; memset(&yop->video_packet, 0, sizeof(yop->video_packet));
yop->video_packet.size = 0;
pkt->data[0] = yop->odd_frame; pkt->data[0] = yop->odd_frame;
pkt->flags |= AV_PKT_FLAG_KEY; pkt->flags |= AV_PKT_FLAG_KEY;
yop->odd_frame ^= 1; yop->odd_frame ^= 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment