h264parse: update parser state and header flag when using fallback sps
authorNicola Murino <nicola.murino@gmail.com>
Mon, 26 Nov 2018 16:23:21 +0000 (17:23 +0100)
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

Closes #503

gst/videoparsers/gsth264parse.c

index fa64671..eed669e 100644 (file)
@@ -849,6 +849,8 @@ gst_h264_parse_process_nal (GstH264Parse * h264parse, GstH264NalUnit * nalu)
       /* arranged for a fallback sps.id, so use that one and only warn */
       if (pres != GST_H264_PARSER_OK) {
         GST_WARNING_OBJECT (h264parse, "failed to parse SPS:");
+        h264parse->state |= GST_H264_PARSE_STATE_GOT_SPS;
+        h264parse->header |= TRUE;
         return FALSE;
       }