do proper cleanup/creation, fixes state changes

Original commit message from CVS:
do proper cleanup/creation, fixes state changes
This commit is contained in:
Thomas Vander Stichele 2005-08-26 00:42:57 +00:00
parent 1eaefa7cad
commit 011fc35e52
2 changed files with 13 additions and 3 deletions

View file

@ -1,3 +1,9 @@
2005-08-26 Thomas Vander Stichele <thomas at apestaart dot org>
* gst/effectv/gstquark.c: (gst_quarktv_init),
(gst_quarktv_change_state):
do proper cleanup/creation, fixes state changes
2005-08-25 Jan Schmidt <thaytan@mad.scientist.com> 2005-08-25 Jan Schmidt <thaytan@mad.scientist.com>
* gst/level/gstlevel.c: (gst_level_message_new): * gst/level/gstlevel.c: (gst_level_message_new):

View file

@ -225,9 +225,6 @@ gst_quarktv_init (GstQuarkTV * filter)
filter->planes = PLANES; filter->planes = PLANES;
filter->current_plane = filter->planes - 1; filter->current_plane = filter->planes - 1;
filter->planetable =
(GstBuffer **) g_malloc (filter->planes * sizeof (GstBuffer *));
memset (filter->planetable, 0, filter->planes * sizeof (GstBuffer *));
} }
static GstFlowReturn static GstFlowReturn
@ -303,6 +300,13 @@ gst_quarktv_change_state (GstElement * element)
filter->planetable = NULL; filter->planetable = NULL;
break; break;
} }
case GST_STATE_READY_TO_PAUSED:
{
filter->planetable =
(GstBuffer **) g_malloc (filter->planes * sizeof (GstBuffer *));
memset (filter->planetable, 0, filter->planes * sizeof (GstBuffer *));
break;
}
default: default:
break; break;
} }