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
1 changed files with 2 additions and 2 deletions

View File

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