Commit f9357157 authored by Yoann Lopes's avatar Yoann Lopes
Browse files

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: default avatarChristian Stromme <christian.stromme@digia.com>
parent 85f4b817
No related merge requests found
Showing with 2 additions and 4 deletions
...@@ -250,10 +250,8 @@ void AVFMediaRecorderControl::setState(QMediaRecorder::State state) ...@@ -250,10 +250,8 @@ void AVFMediaRecorderControl::setState(QMediaRecorder::State state)
qDebugCamera() << "Video capture location:" << actualLocation.toString(); qDebugCamera() << "Video capture location:" << actualLocation.toString();
NSString *urlString = [NSString stringWithUTF8String:actualLocation.toString().toUtf8().constData()]; [m_movieOutput startRecordingToOutputFileURL:actualLocation.toNSURL()
NSURL *fileURL = [NSURL URLWithString:urlString]; recordingDelegate:m_recorderDelagate];
[m_movieOutput startRecordingToOutputFileURL:fileURL recordingDelegate:m_recorderDelagate];
Q_EMIT actualLocationChanged(actualLocation); Q_EMIT actualLocationChanged(actualLocation);
} else { } else {
......
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