summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorHaihua Hu <jared.hu@nxp.com>2021-01-14 14:24:06 +0800
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>2021-04-08 01:06:12 +0000
commite69d0151d28612dcbce7febe6fdd3ae0a5c54345 (patch)
treeb119cfadbbdf23d2febdd868912844ecf086306d /gst
parent0633bef05dd19a4cf18188309e504ab65af48d57 (diff)
downloadgstreamer-plugins-bad-e69d0151d28612dcbce7febe6fdd3ae0a5c54345.tar.gz
jpeg2000parse: fix critical log when play one gray colorspace video
Need guess color space based on number of components when cannot got it from sink caps Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1955>
Diffstat (limited to 'gst')
-rw-r--r--gst/videoparsers/gstjpeg2000parse.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gst/videoparsers/gstjpeg2000parse.c b/gst/videoparsers/gstjpeg2000parse.c
index 18e1bfc01..170b9201d 100644
--- a/gst/videoparsers/gstjpeg2000parse.c
+++ b/gst/videoparsers/gstjpeg2000parse.c
@@ -536,7 +536,9 @@ gst_jpeg2000_parse_handle_frame (GstBaseParse * parse,
if (sink_sampling_string)
sink_sampling = gst_jpeg2000_sampling_from_string (sink_sampling_string);
- } else {
+ }
+
+ if (colorspace == GST_JPEG2000_COLORSPACE_NONE) {
/* guess color space based on number of components */
if (numcomps == 0 || numcomps > 4) {
GST_ERROR_OBJECT (jpeg2000parse,