mpegvideo_enc: use avcodec_free_context() instead of av_free()
authorAnton Khirnov <anton@khirnov.net>
Wed, 24 Feb 2016 10:10:30 +0000 (11:10 +0100)
committerAnton Khirnov <anton@khirnov.net>
Fri, 26 Feb 2016 08:14:59 +0000 (09:14 +0100)
libavcodec/mpegvideo_enc.c

index d16e408..96f49ef 100644 (file)
@@ -1343,8 +1343,7 @@ static int estimate_best_b_count(MpegEncContext *s)
         }
     }
 
-    avcodec_close(c);
-    av_freep(&c);
+    avcodec_free_context(&c);
 
     return best_b_count;
 }