Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for issue #557 #579

Merged
merged 1 commit into from
Dec 2, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions tools/ld-discmap/discmapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -620,17 +620,23 @@ bool DiscMapper::saveDiscMap(DiscMap &discMap)
// Open the input audio file
if (!sourceAudio.open(inputFileInfo)) {
// Could not open input audio file
qInfo() << "Cannot open source audio file:" << inputFileInfo.absolutePath() + "/" + inputFileInfo.baseName() + ".pcm";
qInfo() << "Cannot open source audio file:" << inputFileInfo.absolutePath() + "/" + inputFileInfo.completeBaseName() + ".pcm";
sourceVideo.close();
sourceAudio.close();
return false;
}

// Open the output audio file
targetAudio.setFileName(outputFileInfo.absolutePath() + "/" + outputFileInfo.baseName() + ".pcm");
targetAudio.setFileName(outputFileInfo.absolutePath() + "/" + outputFileInfo.completeBaseName() + ".pcm");
if (targetAudio.exists()) {
qInfo() << "Target audio file already exists:" << targetAudio.fileName() << "- Cannot proceed!";
sourceVideo.close();
sourceAudio.close();
return false;
}
if (!targetAudio.open(QIODevice::WriteOnly)) {
// Could not open target audio file
qInfo() << "Cannot open target audio file:" << outputFileInfo.absolutePath() + "/" + outputFileInfo.baseName() + ".pcm";
qInfo() << "Cannot open target audio file:" << targetAudio.fileName();
sourceVideo.close();
sourceAudio.close();
return false;
Expand Down