Fix memory leak in ffmpeg core packet_buffer
This commit is contained in:
parent
1e54379141
commit
40ecfbcdfa
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue