Unverified Commit 37b00ca1 authored by Jean-Marc Valin's avatar Jean-Marc Valin
Browse files

misc fixes

parent 51f6ebd3
......@@ -135,8 +135,8 @@ extern "C" {
/* FIXME: Add type-checking macros to these. */
#define OPE_SET_PACKET_CALLBACK(x,u) OPE_SET_PACKET_CALLBACK_REQUEST, (x), (u)
#define OPE_GET_PACKET_CALLBACK(x,u) OPE_GET_PACKET_CALLBACK_REQUEST, (x), (u)
#define OPE_SET_HEADER_GAIN(x,u) OPE_SET_HEADER_GAIN_REQUEST, (x), (u)
#define OPE_GET_HEADER_GAIN(x,u) OPE_GET_HEADER_GAIN_REQUEST, (x), (u)
#define OPE_SET_HEADER_GAIN(x,u) OPE_SET_HEADER_GAIN_REQUEST, __opus_check_int(x)
#define OPE_GET_HEADER_GAIN(x,u) OPE_GET_HEADER_GAIN_REQUEST, __opus_check_int_ptr(x)
/*@}*/
/*@}*/
......
......@@ -813,7 +813,9 @@ const char *ope_strerror(int error) {
"invalid picture file",
"invalid icon file (pictures of type 1 MUST be 32x32 PNGs)"
};
if (error > -30) return opus_strerror(error+10);
if (error == 0) return "success";
else if (error >= -10) return "unknown error";
else if (error > -30) return opus_strerror(error+10);
else if (error >= OPE_INVALID_ICON) return ope_error_strings[-error-30];
else return "unknown error";
}
......
......@@ -376,6 +376,8 @@ char *parse_picture_specification(const char *filename, int picture_type, const
if(out!=NULL){
base64_encode(out,(char *)buf+data_offset,data_length);
if(picture_type>=1&&picture_type<=2)*seen_file_icons|=picture_type;
} else {
*error = OPE_ALLOC_FAIL;
}
free(buf);
return out;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment