mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
h264parse: early set src caps when input is avc
When input is in AVC 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. https://bugzilla.gnome.org/show_bug.cgi?id=790709
This commit is contained in:
parent
c9acaae376
commit
5ac886d85a
1 changed files with 5 additions and 0 deletions
|
@ -2706,6 +2706,11 @@ gst_h264_parse_set_caps (GstBaseParse * parse, GstCaps * caps)
|
||||||
if (h264parse->align == GST_H264_PARSE_ALIGN_NAL)
|
if (h264parse->align == GST_H264_PARSE_ALIGN_NAL)
|
||||||
h264parse->split_packetized = TRUE;
|
h264parse->split_packetized = TRUE;
|
||||||
h264parse->packetized = TRUE;
|
h264parse->packetized = TRUE;
|
||||||
|
|
||||||
|
if (format == GST_H264_PARSE_FORMAT_AVC)
|
||||||
|
/* We got all the caps infos from the codec_data so can already set the
|
||||||
|
* src caps. */
|
||||||
|
gst_h264_parse_update_src_caps (h264parse, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
h264parse->in_align = align;
|
h264parse->in_align = align;
|
||||||
|
|
Loading…
Reference in a new issue