summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaihua Hu <jared.hu@nxp.com>2019-02-28 17:42:58 +0800
committerTim-Philipp Müller <tim@centricular.com>2019-05-02 11:01:53 +0100
commit6a7a92befd931904a8df0470354a86f1c6e063e3 (patch)
treec2046ad20830c02bd96e81022ce2faaeb361e832
parent592f0cf0e987ad54de9edeac268b8c9f2a184615 (diff)
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
-rw-r--r--gst/videoparsers/gsth265parse.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gst/videoparsers/gsth265parse.c b/gst/videoparsers/gsth265parse.c
index 775cd24cf..495347220 100644
--- a/gst/videoparsers/gsth265parse.c
+++ b/gst/videoparsers/gsth265parse.c
@@ -573,8 +573,14 @@ gst_h265_parse_process_nal (GstH265Parse * h265parse, GstH265NalUnit * nalu)
/* 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");