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>
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user