x264enc: unmap video frame after encoding
authorMatej Knopp <matej.knopp@gmail.com>
Sat, 11 Feb 2012 10:38:41 +0000 (05:38 -0500)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Sat, 11 Feb 2012 13:33:24 +0000 (13:33 +0000)
Fixes major memory leak.

https://bugzilla.gnome.org/show_bug.cgi?id=669863

ext/x264/gstx264enc.c

index e84fe58..5e0b73c 100644 (file)
@@ -1914,6 +1914,8 @@ gst_x264_enc_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
 
   ret = gst_x264_enc_encode_frame (encoder, &pic_in, &i_nal, TRUE);
 
+  gst_video_frame_unmap (&frame);
+
   /* input buffer is released later on */
   return ret;