jpeg2000parse: support 2-component images
authorAaron Boxer <boxerab@gmail.com>
Tue, 11 Jul 2017 14:09:02 +0000 (10:09 -0400)
committerSebastian Dröge <sebastian@centricular.com>
Mon, 17 Jul 2017 12:53:06 +0000 (15:53 +0300)
https://bugzilla.gnome.org/show_bug.cgi?id=784797

gst/videoparsers/gstjpeg2000parse.c

index 432eb1a..f348877 100644 (file)
@@ -481,7 +481,7 @@ gst_jpeg2000_parse_handle_frame (GstBaseParse * parse,
   if (!gst_byte_reader_get_uint16_be (&reader, &numcomps))
     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,
         ("Unsupported number of components %d", numcomps));
     ret = GST_FLOW_NOT_NEGOTIATED;