summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYoann Lopes <yoann.lopes@digia.com>2014-05-09 17:21:29 +0200
committerYoann Lopes <yoann.lopes@digia.com>2014-07-10 15:59:53 +0200
commitf935715767b6bfcc603128c61adc01c2c68a8e31 (patch)
treefef5ccd41ae1ba30eb3b9081f607423c0d336ff6
parent85f4b8177ca10e7e16ccc3065370589630400f2b (diff)
downloadqtmultimedia-f935715767b6bfcc603128c61adc01c2c68a8e31.tar.gz
AVFoundation: correctly pass output URLs to AVCaptureMovieFileOutput.
The URL string passed to NSURL was not fully encoded, causing the recorder to start with a nil URL, leading to an exception. We now use QURL::toNSURL() which automatically encode the URL. Task-number: QTBUG-38668 Change-Id: I06bf881a0a25fb37efd8784ebf518c8b90ecc6b4 Reviewed-by: Christian Stromme <christian.stromme@digia.com>
-rw-r--r--src/plugins/avfoundation/camera/avfmediarecordercontrol.mm6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/plugins/avfoundation/camera/avfmediarecordercontrol.mm b/src/plugins/avfoundation/camera/avfmediarecordercontrol.mm
index 4e82ada1b..d65d238d9 100644
--- a/src/plugins/avfoundation/camera/avfmediarecordercontrol.mm
+++ b/src/plugins/avfoundation/camera/avfmediarecordercontrol.mm
@@ -250,10 +250,8 @@ void AVFMediaRecorderControl::setState(QMediaRecorder::State state)
qDebugCamera() << "Video capture location:" << actualLocation.toString();
- NSString *urlString = [NSString stringWithUTF8String:actualLocation.toString().toUtf8().constData()];
- NSURL *fileURL = [NSURL URLWithString:urlString];
-
- [m_movieOutput startRecordingToOutputFileURL:fileURL recordingDelegate:m_recorderDelagate];
+ [m_movieOutput startRecordingToOutputFileURL:actualLocation.toNSURL()
+ recordingDelegate:m_recorderDelagate];
Q_EMIT actualLocationChanged(actualLocation);
} else {