GStreamer invalid data flow error

I am using GStreamer in QT5. I am able to initialize the QCamera object and also Viewfinder, but sometimes when I want to capture an image, the video hangs and the application reports:

CameraBin error: "Internal data flow error."
CameraBin error: "Internal data flow error."

Does anyone know a solution for this problem?

What gstreamer pipeline are you trying to implement in Qt? Does it work from the command line using gst-launch? If yes, the problem might be in the gstreamer pipeline construction in application. We do not have Qt expertise so commenting on use of QCamera and Viewfinder itself is probably beyond us.