Default to rgba when subpixelorder is not specified

pull/3246/head
Isaac Connor 2021-05-02 11:49:12 -04:00
parent 44e8107cac
commit 3f5dbb7780
1 changed files with 10 additions and 2 deletions

View File

@ -174,6 +174,10 @@ Image::Image(int p_width, int p_height, int p_colours, int p_subpixelorder, uint
} else {
AllocImgBuffer(size);
}
if (!subpixelorder) {
// Default to RGBA when no subpixelorder is specified.
subpixelorder == ZM_SUBPIX_ORDER_RGBA;
}
imagePixFormat = AVPixFormat();
update_function_pointers();
@ -201,6 +205,10 @@ Image::Image(int p_width, int p_linesize, int p_height, int p_colours, int p_sub
} else {
AllocImgBuffer(size);
}
if (!subpixelorder) {
// Default to RGBA when no subpixelorder is specified.
subpixelorder == ZM_SUBPIX_ORDER_RGBA;
}
imagePixFormat = AVPixFormat();
update_function_pointers();