Skip to content

Commit

Permalink
Fix for issue #557 (#579)
Browse files Browse the repository at this point in the history
  • Loading branch information
simoninns authored Dec 2, 2020
1 parent 73b59e6 commit 58dd379
Showing 1 changed file with 9 additions and 3 deletions.
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

0 comments on commit 58dd379

Please sign in to comment.