Skip to content

Commit 6212117

Browse files
quariumcmassiot
authored andcommitted
upipe_avcenc: fix potential memory leak
1 parent 8816c0f commit 6212117

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/upipe-av/upipe_avcodec_encode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1998,7 +1998,7 @@ static void upipe_avcenc_free(struct upipe *upipe)
19981998
struct upipe_avcenc *upipe_avcenc = upipe_avcenc_from_upipe(upipe);
19991999

20002000
if (upipe_avcenc->context != NULL)
2001-
av_free(upipe_avcenc->context);
2001+
avcodec_free_context(&upipe_avcenc->context);
20022002
av_frame_free(&upipe_avcenc->frame);
20032003
av_packet_free(&upipe_avcenc->avpkt);
20042004

0 commit comments

Comments
 (0)