Fix memory leak in ffmpeg core packet_buffer

This commit is contained in:
Nils Hasenbanck 2020-01-08 21:02:23 +01:00
parent 1e54379141
commit 40ecfbcdfa

View File

@ -38,10 +38,10 @@ void packet_buffer_destroy(packet_buffer_t *packet_buffer)
if (packet_buffer->head)
{
node = packet_buffer->head;
while (node->next)
while (node)
{
AVPacketNode_t *next = node->next;
av_packet_unref(node->data);
av_packet_free(&node->data);
free(node);
node = next;
}