avcodec_get_context_defaults3 may allocate memory, so free the context
using the proper avcodec_free_context() function.
---
libavcodec/options.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/options.c b/libavcodec/options.c
index c00dca0..8ff7b91 100644
--- a/libavcodec/options.c
+++ b/libavcodec/options.c
@@ -131,7 +131,7 @@ AVCodecContext *avcodec_alloc_context3(const AVCodec *codec)
return NULL;
if(avcodec_get_context_defaults3(avctx, codec) < 0){
- av_free(avctx);
+ avcodec_free_context(&avctx);
return NULL;
}
--
1.9.5 (Apple Git-50.3)
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel