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
This commit is contained in:
Guillaume Desmottes 2017-11-22 14:35:31 +01:00 committed by Sebastian Dröge
parent 5ac886d85a
commit 93d29e8030

View file

@ -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;