]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/options.c
mpegencconetxt: Move rv10-specific orig_width/orig_height where they belong
[ffmpeg] / libavcodec / options.c
index 85c1bec9bedf9ad6219cdd7571c3c7aca32543f4..e3ded738bb64e378c26e96f94174e1351b7f2475 100644 (file)
@@ -135,6 +135,21 @@ AVCodecContext *avcodec_alloc_context3(const AVCodec *codec)
     return avctx;
 }
 
+void avcodec_free_context(AVCodecContext **pavctx)
+{
+    AVCodecContext *avctx = *pavctx;
+
+    if (!avctx)
+        return;
+
+    avcodec_close(avctx);
+
+    av_freep(&avctx->extradata);
+    av_freep(&avctx->subtitle_header);
+
+    av_freep(pavctx);
+}
+
 int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src)
 {
     const AVCodec *orig_codec = dest->codec;