diff options
author | Haihua Hu <jared.hu@nxp.com> | 2019-02-28 17:42:58 +0800 |
---|---|---|
committer | Haihua Hu <jared.hu@nxp.com> | 2019-03-26 02:06:03 +0000 |
commit | 54982527509d23f36827181a59275547a811559f (patch) | |
tree | 31ae90a20ed2343a963412938c4ef2724e65b596 | |
parent | dbef8c43e89c13e496e6ffbb85fef9d12431001f (diff) | |
download | gstreamer-plugins-bad-54982527509d23f36827181a59275547a811559f.tar.gz |
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.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gst/videoparsers/gsth265parse.c b/gst/videoparsers/gsth265parse.c index 3ae78aa8c..c7fd8bf5b 100644 --- a/gst/videoparsers/gsth265parse.c +++ b/gst/videoparsers/gsth265parse.c @@ -613,8 +613,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"); |