h265parse: Don't push NALs before we have HEADERS

Otherwise we may endup pushing incomplete caps. Note that this has the side
effect that caps are no longer pushed twice in presence of VUI with valid
framerate.
This commit is contained in:
Nicolas Dufresne 2018-10-10 15:27:30 +00:00 committed by Nicolas Dufresne
parent c51922b06c
commit ff137a2059

View file

@ -1308,6 +1308,13 @@ gst_h265_parse_handle_frame (GstBaseParse * parse,
goto skip;
}
/* Do not push immediatly if we don't have all headers. This ensure that
* our caps are complete, avoiding a renegotiation */
if (h265parse->align == GST_H265_PARSE_ALIGN_NAL &&
!GST_H265_PARSE_STATE_VALID (h265parse,
GST_H265_PARSE_STATE_VALID_PICTURE_HEADERS))
frame->flags |= GST_BASE_PARSE_FRAME_FLAG_QUEUE;
if (nonext) {
/* If there is a marker flag, or input is AU, we know this is complete */
if (GST_BUFFER_FLAG_IS_SET (frame->buffer, GST_BUFFER_FLAG_MARKER) ||