mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-02 08:39:46 +02:00
Fix for bug #787
But, it made another issue visible...several exporters fail silently and the user may thing the export was successful when it was not. Will be hitting that next.
This commit is contained in:
parent
d10d2bdedc
commit
40ec0eda12
@ -225,12 +225,12 @@ int ufile_fopen(AVIOContext **s, const wxString & name, int flags)
|
||||
|
||||
f = new wxFile;
|
||||
if (!f) {
|
||||
return ENOMEM;
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
if (flags == (AVIO_FLAG_READ | AVIO_FLAG_WRITE)) {
|
||||
delete f;
|
||||
return EINVAL;
|
||||
return -EINVAL;
|
||||
} else if (flags == AVIO_FLAG_WRITE) {
|
||||
mode = wxFile::write;
|
||||
} else {
|
||||
@ -239,7 +239,7 @@ int ufile_fopen(AVIOContext **s, const wxString & name, int flags)
|
||||
|
||||
if (!f->Open(name, mode)) {
|
||||
delete f;
|
||||
return ENOENT;
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
*s = avio_alloc_context((unsigned char*)av_malloc(32768), 32768,
|
||||
@ -250,7 +250,7 @@ int ufile_fopen(AVIOContext **s, const wxString & name, int flags)
|
||||
ufile_seek);
|
||||
if (!*s) {
|
||||
delete f;
|
||||
return ENOMEM;
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user