MMFMWK-8398 h265parse: ignore VUI parse fail when parse SPS
VUI is an optional for SPS parse, some HEVC file has incorrect VUI
parameters but still can be decoded
diff --git a/gst/videoparsers/gsth265parse.c b/gst/videoparsers/gsth265parse.c
index da0fa60..df28348 100644
--- a/gst/videoparsers/gsth265parse.c
+++ b/gst/videoparsers/gsth265parse.c
@@ -573,8 +573,13 @@
/* arranged for a fallback sps.id, so use that one and only warn */
if (pres != GST_H265_PARSER_OK) {
- GST_WARNING_OBJECT (h265parse, "failed to parse SPS:");
- return FALSE;
+ /* try to not parse VUI */
+ pres = gst_h265_parser_parse_sps (nalparser, nalu, &sps, FALSE);
+ if (pres != GST_H265_PARSER_OK) {
+ GST_WARNING_OBJECT (h265parse, "failed to parse SPS:");
+ return FALSE;
+ }
+ GST_WARNING_OBJECT (h265parse, "failed to parse VUI of SPS, ignore VUI");
}
GST_DEBUG_OBJECT (h265parse, "triggering src caps check");