From c22b52ef4d779075da9f5d5fe372b8c1a604784e Mon Sep 17 00:00:00 2001 From: Nicola Murino Date: Mon, 26 Nov 2018 17:23:21 +0100 Subject: [PATCH] h264parse: update parser state and header flag when using fallback sps 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 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gst/videoparsers/gsth264parse.c b/gst/videoparsers/gsth264parse.c index fa64671de4..eed669e157 100644 --- a/gst/videoparsers/gsth264parse.c +++ b/gst/videoparsers/gsth264parse.c @@ -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; }