Commit 23f05a26 authored by Jan Alexander Steffens's avatar Jan Alexander Steffens
Browse files

interlace: Reset after changing state to READY

Trying to reset before the pads have been deactivated races with the
streaming thread. There was also a buggy buffer clear leaving a dangling
`stored_frame` pointer around. Use `gst_interlace_reset` so this happens
properly.

Part-of: <gstreamer/gst-plugins-bad!2553>
parent f2ef2dc4
......@@ -1485,23 +1485,23 @@ static GstStateChangeReturn
gst_interlace_change_state (GstElement * element, GstStateChange transition)
{
GstInterlace *interlace = GST_INTERLACE (element);
GstStateChangeReturn ret;
ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
switch (transition) {
case GST_STATE_CHANGE_PAUSED_TO_READY:
g_mutex_lock (&interlace->lock);
interlace->src_fps_n = 0;
if (interlace->stored_frame) {
gst_buffer_unref (interlace->stored_frame);
}
g_mutex_unlock (&interlace->lock);
/* why? */
//gst_interlace_reset (interlace);
gst_interlace_reset (interlace);
break;
default:
break;
}
return GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
return ret;
}
static gboolean
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment