summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2002-09-12 20:57:09 +0000
committerWim Taymans <wim.taymans@gmail.com>2002-09-12 20:57:09 +0000
commit876f5f22a962f05b76fb1a211ec8a976cd552f3e (patch)
tree64000bb82bbda8b8a105b50cb294c2ba87043948
parentd368d1ad76a9c66031371c6aba0d89138df4063e (diff)
downloadgstreamer-plugins-bad-876f5f22a962f05b76fb1a211ec8a976cd552f3e.tar.gz
Destroy state when going to READY
Original commit message from CVS: Destroy state when going to READY
-rw-r--r--ext/hermes/gstcolorspace.c14
-rw-r--r--ext/hermes/yuv2rgb.c7
-rw-r--r--ext/hermes/yuv2rgb.h2
3 files changed, 15 insertions, 8 deletions
diff --git a/ext/hermes/gstcolorspace.c b/ext/hermes/gstcolorspace.c
index fe21fc569..84c124b6a 100644
--- a/ext/hermes/gstcolorspace.c
+++ b/ext/hermes/gstcolorspace.c
@@ -541,6 +541,13 @@ gst_colorspace_change_state (GstElement *element)
case GST_STATE_PLAYING_TO_PAUSED:
space->pool = NULL;
break;
+ case GST_STATE_PAUSED_TO_READY:
+ gst_colorspace_converter_destroy (space->converter);
+ space->converter = NULL;
+ space->disabled = TRUE;
+ space->type = GST_COLORSPACE_NONE;
+ space->sinkcaps = NULL;
+ break;
}
parent_class->change_state (element);
@@ -612,10 +619,3 @@ GstPluginDesc plugin_desc = {
plugin_init
};
-
-
-
-
-
-
-
diff --git a/ext/hermes/yuv2rgb.c b/ext/hermes/yuv2rgb.c
index 55765bf5f..4e98642cf 100644
--- a/ext/hermes/yuv2rgb.c
+++ b/ext/hermes/yuv2rgb.c
@@ -201,6 +201,13 @@ gst_colorspace_yuv2rgb_get_converter (GstCaps *from, GstCaps *to)
return new;
}
+void
+gst_colorspace_converter_destroy (GstColorSpaceConverter *conv)
+{
+ if (conv)
+ g_free (conv);
+}
+
static void gst_colorspace_I420_to_rgb32(GstColorSpaceConverter *space, unsigned char *src, unsigned char *dest)
{
int size;
diff --git a/ext/hermes/yuv2rgb.h b/ext/hermes/yuv2rgb.h
index c77fd7027..699234a38 100644
--- a/ext/hermes/yuv2rgb.h
+++ b/ext/hermes/yuv2rgb.h
@@ -62,7 +62,7 @@ struct _GstColorSpaceConverter {
GstColorSpaceConverter* gst_colorspace_yuv2rgb_get_converter (GstCaps *from, GstCaps *to);
#define gst_colorspace_convert(converter, src, dest) \
(converter)->convert((converter), (src), (dest))
-void gst_colorspace_destroy (GstColorSpaceConverter *space);
+void gst_colorspace_converter_destroy (GstColorSpaceConverter *space);
#endif