h265parse: update parser state and header flag when using fallback sps
authorNicola Murino <nicola.murino@gmail.com>
Mon, 8 Apr 2019 17:24:00 +0000 (19:24 +0200)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>
Sun, 16 Jun 2019 00:02:10 +0000 (20:02 -0400)
When sps parsing fails we use a fallback sps from the caps, since we
have got an sps we need to update parser state and header as in the case the
sps was successfully parsed

gst/videoparsers/gsth265parse.c

index f5f6092..feb2001 100644 (file)
@@ -727,6 +727,8 @@ gst_h265_parse_process_nal (GstH265Parse * h265parse, GstH265NalUnit * nalu)
         pres = gst_h265_parser_parse_sps (nalparser, nalu, &sps, FALSE);
         if (pres != GST_H265_PARSER_OK) {
           GST_WARNING_OBJECT (h265parse, "failed to parse SPS:");
+          h265parse->state |= GST_H265_PARSE_STATE_GOT_SPS;
+          h265parse->header |= TRUE;
           return FALSE;
         }
         GST_WARNING_OBJECT (h265parse,