summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/mpegvideo_enc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 297ff78840..f8de0281ff 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -1518,8 +1518,7 @@ static int estimate_best_b_count(MpegEncContext *s)
}
}
- avcodec_close(c);
- av_freep(&c);
+ avcodec_free_context(&c);
return best_b_count;
}