GNOME Bugzilla – Bug 761609
qmlglsink: Clear buffer in transition to Null state instead of Ready state in gstqtsink.cc
Last modified: 2016-11-15 05:39:55 UTC
I noticed that if my pipeline gets stopped, the glsinkbin displays some random data from graphicd memory instead of the last image. To prevent this I changed the behaviour in the way that the current buffer is set to NULL in transition from READY to NULL instead of PAUSED to READY. At least that fixes the visual aspect. But I am not sure if that has any side effects I didnt notice yet. Below the diff output for gstqtsink.cc: --------------------------- index b6a6fa5..5471369 100644 --- a/ext/qt/gstqtsink.cc +++ b/ext/qt/gstqtsink.cc @@ -354,9 +354,9 @@ gst_qt_sink_change_state (GstElement * element, GstStateChange transition) case GST_STATE_CHANGE_PLAYING_TO_PAUSED: break; case GST_STATE_CHANGE_PAUSED_TO_READY: - qt_item_set_buffer (qt_sink->widget, NULL); break; case GST_STATE_CHANGE_READY_TO_NULL: + qt_item_set_buffer (qt_sink->widget, NULL); break; default: break; diff --git a/ext/qt/qtitem.cc b/ext/qt/qtitem.cc
Shouldn't it still display some random data when setting the pipeline to NULL now? Can you provide a simple testcase for this problem, e.g. based on the example app in gst-plugins-bad?
The aforementioned example has not been provided. If you can provide an example, feel free to reopen.