fix resource leak when rotating encoder (#2141)

pull/2248/head
Dean Lee 5 years ago committed by GitHub
parent be7cc63e3d
commit 209e7aa471
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      selfdrive/loggerd/encoder.c

@ -637,6 +637,7 @@ void encoder_close(EncoderState *s) {
if (s->remuxing) {
av_write_trailer(s->ofmt_ctx);
avcodec_free_context(&s->codec_ctx);
avio_closep(&s->ofmt_ctx->pb);
avformat_free_context(s->ofmt_ctx);
} else {

Loading…
Cancel
Save