summaryrefslogtreecommitdiff
path: root/sys/vdpau
diff options
context:
space:
mode:
authorCarl-Anton Ingmarsson <ca.ingmarsson@gmail.com>2010-06-27 10:52:33 +0200
committerCarl-Anton Ingmarsson <ca.ingmarsson@gmail.com>2010-06-28 11:11:52 +0200
commit7274d9f1423a20f140e270f5a43edb6ddc8708b2 (patch)
tree3aea4ea175f6f052c3f347b45386fb8b53b3f482 /sys/vdpau
parentd930556a473d92007f9ebfa5db7fa6f4eac8a64b (diff)
vdpauh264dec: free frames on finalize in GstH264DPB
Diffstat (limited to 'sys/vdpau')
-rw-r--r--sys/vdpau/h264/gsth264dpb.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/vdpau/h264/gsth264dpb.c b/sys/vdpau/h264/gsth264dpb.c
index 6d75d582f..11a7d2c3c 100644
--- a/sys/vdpau/h264/gsth264dpb.c
+++ b/sys/vdpau/h264/gsth264dpb.c
@@ -49,8 +49,8 @@ gst_h264_dpb_fill_reference_frames (GstH264DPB * dpb,
GstH264Frame *frame = frames[i];
reference_frames[i].surface =
- GST_VDP_VIDEO_BUFFER (GST_VIDEO_FRAME_CAST (frame)->
- src_buffer)->surface;
+ GST_VDP_VIDEO_BUFFER (GST_VIDEO_FRAME_CAST (frame)->src_buffer)->
+ surface;
reference_frames[i].is_long_term = frame->is_long_term;
reference_frames[i].top_is_reference = frame->is_reference;
@@ -373,7 +373,13 @@ gst_h264_dpb_set_property (GObject * object, guint property_id,
static void
gst_h264_dpb_finalize (GObject * object)
{
- /* TODO: Add deinitalization code here */
+ GstH264DPB *dpb = GST_H264_DPB (object);
+ GstVideoFrame **frames;
+ guint i;
+
+ frames = (GstVideoFrame **) dpb->frames;
+ for (i = 0; i < dpb->n_frames; i++)
+ gst_video_frame_unref (frames[i]);
G_OBJECT_CLASS (gst_h264_dpb_parent_class)->finalize (object);
}