diff options
author | VaL Doroshchuk <valentyn.doroshchuk@qt.io> | 2020-04-02 14:34:50 +0200 |
---|---|---|
committer | VaL Doroshchuk <valentyn.doroshchuk@qt.io> | 2020-04-20 13:03:20 +0200 |
commit | b8525df9434d34f24c488848e320d1bc77de49cd (patch) | |
tree | ee4437c221615aa1be3183a2f28959595443d487 /src/plugins/gstreamer | |
parent | 19f6faf671438dc9c5165733a1b060fe2dfe1956 (diff) |
GStreamer: Remove file when CaptureToBuffer is used
Capturing the image is handled by camerabin and it saves the image to a file.
And we wanted to remove the file if capturing to buffer is requested,
but the file is kept and not removed.
Change-Id: I21404fc160bf275325deebf0f00b588de3493ee1
Fixes: QTBUG-82572
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Diffstat (limited to 'src/plugins/gstreamer')
-rw-r--r-- | src/plugins/gstreamer/camerabin/camerabinimagecapture.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/plugins/gstreamer/camerabin/camerabinimagecapture.cpp b/src/plugins/gstreamer/camerabin/camerabinimagecapture.cpp index 52ec75f44..b164bc31a 100644 --- a/src/plugins/gstreamer/camerabin/camerabinimagecapture.cpp +++ b/src/plugins/gstreamer/camerabin/camerabinimagecapture.cpp @@ -366,12 +366,9 @@ bool CameraBinImageCapture::processBusMessage(const QGstreamerMessage &message) #ifdef DEBUG_CAPTURE qDebug() << Q_FUNC_INFO << "Dropped saving file" << fileName; #endif - //camerabin creates an empty file when captured buffer is dropped, - //let's remove it QFileInfo info(QString::fromUtf8(fileName)); - if (info.exists() && info.isFile() && info.size() == 0) { + if (info.exists() && info.isFile()) QFile(info.absoluteFilePath()).remove(); - } } } } |