Commit 10e0b85a authored by Sebastian Dröge's avatar Sebastian Dröge

encodebin: Release pads after setting the state to NULL in the unit test

See bug #647756.
parent 67d2f852
...@@ -359,15 +359,15 @@ GST_START_TEST (test_encodebin_sink_pads_multiple_dynamic) ...@@ -359,15 +359,15 @@ GST_START_TEST (test_encodebin_sink_pads_multiple_dynamic)
fail_unless_equals_int (gst_element_set_state (ebin, GST_STATE_PAUSED), fail_unless_equals_int (gst_element_set_state (ebin, GST_STATE_PAUSED),
GST_STATE_CHANGE_SUCCESS); GST_STATE_CHANGE_SUCCESS);
/* Set back to NULL */
fail_unless_equals_int (gst_element_set_state (ebin, GST_STATE_NULL),
GST_STATE_CHANGE_SUCCESS);
gst_element_release_request_pad (GST_ELEMENT (ebin), sinkpadvorbis); gst_element_release_request_pad (GST_ELEMENT (ebin), sinkpadvorbis);
gst_object_unref (sinkpadvorbis); gst_object_unref (sinkpadvorbis);
gst_element_release_request_pad (GST_ELEMENT (ebin), sinkpadtheora); gst_element_release_request_pad (GST_ELEMENT (ebin), sinkpadtheora);
gst_object_unref (sinkpadtheora); gst_object_unref (sinkpadtheora);
/* Set back to NULL */
fail_unless_equals_int (gst_element_set_state (ebin, GST_STATE_NULL),
GST_STATE_CHANGE_SUCCESS);
gst_object_unref (ebin); gst_object_unref (ebin);
}; };
...@@ -604,13 +604,13 @@ GST_START_TEST (test_encodebin_render_audio_dynamic) ...@@ -604,13 +604,13 @@ GST_START_TEST (test_encodebin_render_audio_dynamic)
} }
} }
gst_element_release_request_pad (GST_ELEMENT (ebin), sinkpad);
gst_object_unref (sinkpad);
/* Set back to NULL */ /* Set back to NULL */
fail_unless_equals_int (gst_element_set_state (pipeline, GST_STATE_NULL), fail_unless_equals_int (gst_element_set_state (pipeline, GST_STATE_NULL),
GST_STATE_CHANGE_SUCCESS); GST_STATE_CHANGE_SUCCESS);
gst_element_release_request_pad (GST_ELEMENT (ebin), sinkpad);
gst_object_unref (sinkpad);
gst_object_unref (bus); gst_object_unref (bus);
gst_object_unref (pipeline); gst_object_unref (pipeline);
...@@ -745,15 +745,15 @@ GST_START_TEST (test_encodebin_render_audio_video_dynamic) ...@@ -745,15 +745,15 @@ GST_START_TEST (test_encodebin_render_audio_video_dynamic)
} }
} }
/* Set back to NULL */
fail_unless_equals_int (gst_element_set_state (pipeline, GST_STATE_NULL),
GST_STATE_CHANGE_SUCCESS);
gst_element_release_request_pad (GST_ELEMENT (ebin), sinkpad1); gst_element_release_request_pad (GST_ELEMENT (ebin), sinkpad1);
gst_object_unref (sinkpad1); gst_object_unref (sinkpad1);
gst_element_release_request_pad (GST_ELEMENT (ebin), sinkpad2); gst_element_release_request_pad (GST_ELEMENT (ebin), sinkpad2);
gst_object_unref (sinkpad2); gst_object_unref (sinkpad2);
/* Set back to NULL */
fail_unless_equals_int (gst_element_set_state (pipeline, GST_STATE_NULL),
GST_STATE_CHANGE_SUCCESS);
gst_object_unref (bus); gst_object_unref (bus);
gst_object_unref (pipeline); gst_object_unref (pipeline);
......
Markdown is supported
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