summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
authorSebastian Dröge <slomo@circular-chaos.org>2007-12-15 17:52:46 +0000
committerSebastian Dröge <slomo@circular-chaos.org>2007-12-15 17:52:46 +0000
commitcd9b0d71689e735ac363e70cc844345acccf6afa (patch)
tree160846f65921186febd0685f38afeaa380772db2 /gst
parent00ec95f3d249dd87705318b23c110e14035bf7f3 (diff)
downloadgst-plugins-bad-cd9b0d71689e735ac363e70cc844345acccf6afa.tar.gz
gst-plugins-bad-cd9b0d71689e735ac363e70cc844345acccf6afa.tar.bz2
gst-plugins-bad-cd9b0d71689e735ac363e70cc844345acccf6afa.zip
gst/videoparse/gstvideoparse.c: Free the adapter on dispose and correctly reset on newsegment events.
Original commit message from CVS: * gst/videoparse/gstvideoparse.c: (gst_video_parse_dispose), (gst_video_parse_sink_event): Free the adapter on dispose and correctly reset on newsegment events.
Diffstat (limited to 'gst')
-rw-r--r--gst/videoparse/gstvideoparse.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/gst/videoparse/gstvideoparse.c b/gst/videoparse/gstvideoparse.c
index 36c59189..9e6958d5 100644
--- a/gst/videoparse/gstvideoparse.c
+++ b/gst/videoparse/gstvideoparse.c
@@ -337,7 +337,12 @@ gst_video_parse_init (GstVideoParse * vp, GstVideoParseClass * g_class)
static void
gst_video_parse_dispose (GObject * object)
{
- //GstVideoParse *vp = GST_VIDEO_PARSE (object);
+ GstVideoParse *vp = GST_VIDEO_PARSE (object);
+
+ if (vp->adapter) {
+ g_object_unref (vp->adapter);
+ vp->adapter = NULL;
+ }
G_OBJECT_CLASS (parent_class)->dispose (object);
}
@@ -725,6 +730,10 @@ gst_video_parse_sink_event (GstPad * pad, GstEvent * event)
ret = gst_pad_push_event (vp->srcpad, event);
}
+
+ vp->n_frames = 0;
+ vp->discont = TRUE;
+ gst_adapter_clear (vp->adapter);
break;
}
default: