1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-04-30 15:49:41 +02:00

Bug 2515 - (FFmpeg) Exporting to a disk with insufficient space gives messages that are not user-friendly or helpful

FFmpeg now gives the correct message.
Bug not quite closed yet, as other exports are only part done.
This commit is contained in:
James Crook 2020-09-21 13:05:11 +01:00
parent 6d1b3854e9
commit 0b633c564a

View File

@ -39,6 +39,7 @@ function.
#include "../Tags.h" #include "../Tags.h"
#include "../Track.h" #include "../Track.h"
#include "../widgets/AudacityMessageBox.h" #include "../widgets/AudacityMessageBox.h"
#include "../widgets/ErrorDialog.h"
#include "../widgets/ProgressDialog.h" #include "../widgets/ProgressDialog.h"
#include "../wxFileNameWrapper.h" #include "../wxFileNameWrapper.h"
@ -953,10 +954,13 @@ bool ExportFFmpeg::EncodeAudioFrame(int16_t *pFrame, size_t frameSize)
// Write the encoded audio frame to the output file. // Write the encoded audio frame to the output file.
if ((ret = av_interleaved_write_frame(mEncFormatCtx.get(), &pkt)) < 0) if ((ret = av_interleaved_write_frame(mEncFormatCtx.get(), &pkt)) < 0)
{ {
AudacityMessageBox( ShowErrorDialog(nullptr,
XO("FFmpeg : ERROR - Failed to write audio frame to file."), XO("Warning"),
XO("FFmpeg Error"), XO("Audacity failed to write to a file.\n"
wxOK|wxCENTER|wxICON_EXCLAMATION "Perhaps the file is not writable or the disk is full.\n"
"For tips on freeing up space, click the help button."
),
"Error:_Disk_full_or_not_writable"
); );
return false; return false;
} }