mirror of
https://github.com/librempeg/librempeg
synced 2024-11-23 11:39:47 +00:00
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>
This commit is contained in:
parent
3185a80259
commit
d8b6866014
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user