From 93d29e80300f566b7a8e7d86beecb578fe03821c Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Wed, 22 Nov 2017 14:35:31 +0100 Subject: [PATCH] h265parse: early set src caps when input not byte-stream When input is not in byte-stream format there is no need to wait for the first buffer before setting src caps. We already have all the information from the input codec_data. This allow us to already configure downstream elements allowing them, for example, to already allocate their internal buffers as they know the format of the input they are about to receive. Same change as the one I just did in h264parse. https://bugzilla.gnome.org/show_bug.cgi?id=790709 --- gst/videoparsers/gsth265parse.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gst/videoparsers/gsth265parse.c b/gst/videoparsers/gsth265parse.c index 85be016100..7800b15ae1 100644 --- a/gst/videoparsers/gsth265parse.c +++ b/gst/videoparsers/gsth265parse.c @@ -2121,6 +2121,10 @@ gst_h265_parse_set_caps (GstBaseParse * parse, GstCaps * caps) if (h265parse->align == GST_H265_PARSE_ALIGN_NAL) h265parse->split_packetized = TRUE; h265parse->packetized = TRUE; + + /* We got all the caps infos from the codec_data so can already set the + * src caps. */ + gst_h265_parse_update_src_caps (h265parse, NULL); } return TRUE;