1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-14 23:30:23 +02:00

Fix zero-sized mp3 import

This commit is contained in:
LRN1986 2010-03-26 16:29:21 +00:00
parent 1ce96f737f
commit f4197d29e1

View File

@ -405,7 +405,8 @@ enum mad_flow input_cb(void *_data, struct mad_stream *stream)
struct private_data *data = (struct private_data *)_data; struct private_data *data = (struct private_data *)_data;
data->updateResult = data->progress->Update((wxULongLong_t)data->file->Tell(), data->updateResult = data->progress->Update((wxULongLong_t)data->file->Tell(),
(wxULongLong_t)data->file->Length()); (wxULongLong_t)data->file->Length() != 0 ?
(wxULongLong_t)data->file->Length() : 1);
if(data->updateResult != eProgressSuccess) if(data->updateResult != eProgressSuccess)
return MAD_FLOW_STOP; return MAD_FLOW_STOP;