@@ -669,23 +669,23 @@ VideoConsumer::LocalSave(char* filename, BBitmap* bitmap)
|
|||||||
if (output->SetTo(filename, B_READ_WRITE | B_CREATE_FILE | B_ERASE_FILE) == B_NO_ERROR) {
|
if (output->SetTo(filename, B_READ_WRITE | B_CREATE_FILE | B_ERASE_FILE) == B_NO_ERROR) {
|
||||||
BBitmapStream input(bitmap);
|
BBitmapStream input(bitmap);
|
||||||
status_t err = BTranslatorRoster::Default()->Translate(&input, NULL, NULL,
|
status_t err = BTranslatorRoster::Default()->Translate(&input, NULL, NULL,
|
||||||
output, fImageFormat);
|
output, fImageFormat);
|
||||||
if (err == B_OK) {
|
if (err == B_OK) {
|
||||||
err = SetFileType(output, fTranslator, fImageFormat);
|
err = SetFileType(output, fTranslator, fImageFormat);
|
||||||
if (err != B_OK)
|
if (err != B_OK)
|
||||||
UpdateFtpStatus(B_TRANSLATE("Error setting type of output file"));
|
UpdateFtpStatus(B_TRANSLATE("Error setting type of output file"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
UpdateFtpStatus(B_TRANSLATE("Error writing output file"));
|
UpdateFtpStatus(B_TRANSLATE("Error writing output file"));
|
||||||
|
|
||||||
input.DetachBitmap(&bitmap);
|
input.DetachBitmap(&bitmap);
|
||||||
output->Unset();
|
output->Unset();
|
||||||
delete output;
|
delete output;
|
||||||
return B_OK;
|
return B_OK;
|
||||||
} else {
|
} else {
|
||||||
UpdateFtpStatus(B_TRANSLATE("Error creating output file"));
|
UpdateFtpStatus(B_TRANSLATE("Error creating output file"));
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user