jpeg2000parse: support 2-component images

https://bugzilla.gnome.org/show_bug.cgi?id=784797
This commit is contained in:
Aaron Boxer 2017-07-11 10:09:02 -04:00 committed by Sebastian Dröge
parent e10276a616
commit 45dbe864e2

View file

@ -481,7 +481,7 @@ gst_jpeg2000_parse_handle_frame (GstBaseParse * parse,
if (!gst_byte_reader_get_uint16_be (&reader, &numcomps)) if (!gst_byte_reader_get_uint16_be (&reader, &numcomps))
goto beach; goto beach;
if (numcomps == 2 || numcomps > GST_JPEG2000_PARSE_MAX_SUPPORTED_COMPONENTS) { if (numcomps == 0 || numcomps > GST_JPEG2000_PARSE_MAX_SUPPORTED_COMPONENTS) {
GST_ELEMENT_ERROR (jpeg2000parse, STREAM, DECODE, NULL, GST_ELEMENT_ERROR (jpeg2000parse, STREAM, DECODE, NULL,
("Unsupported number of components %d", numcomps)); ("Unsupported number of components %d", numcomps));
ret = GST_FLOW_NOT_NEGOTIATED; ret = GST_FLOW_NOT_NEGOTIATED;