basevideocodec: fully free video frame
authorMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Tue, 29 Mar 2011 13:41:55 +0000 (15:41 +0200)
committerMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Mon, 16 May 2011 18:32:23 +0000 (20:32 +0200)
gst-libs/gst/video/gstbasevideocodec.c
gst-libs/gst/video/gstbasevideoencoder.c

index 7e96bd2fe0cf4d28e9d2c571e62177ec6963e047..07085f7304900fa71a0037b0ac2cc9c646b52392 100644 (file)
@@ -178,5 +178,9 @@ gst_base_video_codec_free_frame (GstVideoFrame * frame)
     gst_buffer_unref (frame->sink_buffer);
   }
 
+  if (frame->src_buffer) {
+    gst_buffer_unref (frame->src_buffer);
+  }
+
   g_free (frame);
 }
index 5c9950c361dc8cdb06ec3136211e2734434853a6..67b139454b6f1e92bac5d0beb1a7d932569d78f5 100644 (file)
@@ -833,6 +833,8 @@ gst_base_video_encoder_finish_frame (GstBaseVideoEncoder * base_video_encoder,
         frame->src_buffer);
   }
 
+  /* handed out */
+  frame->src_buffer = NULL;
   gst_base_video_codec_free_frame (frame);
 
   return ret;