mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
h264decoder: Fix for latency report when src caps is not configured
Depending on subclass, negotiation might not happen on new_sequence()
Fixing regression introduced by the commit
4a4823b972
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4357>
This commit is contained in:
parent
d7d0c969df
commit
560fd4834c
1 changed files with 10 additions and 8 deletions
|
@ -2310,9 +2310,10 @@ gst_h264_decoder_set_latency (GstH264Decoder * self, const GstH264SPS * sps,
|
||||||
guint32 frames_delay;
|
guint32 frames_delay;
|
||||||
|
|
||||||
caps = gst_pad_get_current_caps (GST_VIDEO_DECODER_SRC_PAD (self));
|
caps = gst_pad_get_current_caps (GST_VIDEO_DECODER_SRC_PAD (self));
|
||||||
if (!caps)
|
if (!caps && self->input_state)
|
||||||
return;
|
caps = gst_caps_ref (self->input_state->caps);
|
||||||
|
|
||||||
|
if (caps) {
|
||||||
structure = gst_caps_get_structure (caps, 0);
|
structure = gst_caps_get_structure (caps, 0);
|
||||||
if (gst_structure_get_fraction (structure, "framerate", &fps_n, &fps_d)) {
|
if (gst_structure_get_fraction (structure, "framerate", &fps_n, &fps_d)) {
|
||||||
if (fps_n == 0) {
|
if (fps_n == 0) {
|
||||||
|
@ -2321,6 +2322,7 @@ gst_h264_decoder_set_latency (GstH264Decoder * self, const GstH264SPS * sps,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
gst_caps_unref (caps);
|
gst_caps_unref (caps);
|
||||||
|
}
|
||||||
|
|
||||||
/* if no fps or variable, then 25/1 */
|
/* if no fps or variable, then 25/1 */
|
||||||
if (fps_n == 0) {
|
if (fps_n == 0) {
|
||||||
|
|
Loading…
Reference in a new issue