gst-validate: properly set pipeline to null before unref

In case it fails when going ready->paused it will remain in ready state
and be unref'd in ready, leading to an assertion
This commit is contained in:
Thiago Santos 2014-07-21 22:01:27 -03:00
parent e1b3ec2ad7
commit d7c3d652d0

View file

@ -453,6 +453,7 @@ main (int argc, gchar ** argv)
case GST_STATE_CHANGE_FAILURE:
/* ignore, we should get an error message posted on the bus */
g_print ("Pipeline failed to go to PLAYING state\n");
gst_element_set_state (pipeline, GST_STATE_NULL);
ret = -1;
goto exit;
case GST_STATE_CHANGE_NO_PREROLL: