mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 10:11:08 +00:00
h265decoder: Fix for unhandled low-delay decoding case
Baseclass calls get_preferred_output_delay() in a chain of sequence header parsing and then new_sequence() is called with required DPB size (includes render-delay) information. Thus latency query should happen before the sequence header parsing for subclass to report required render-delay accordingly via get_preferred_output_delay() method. (e.g., zero delay in case of live pipeline) This commit is to fix wrong liveness signalling in case of upstream packetized format. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2364>
This commit is contained in:
parent
58c94eed84
commit
ad136cb2c5
1 changed files with 6 additions and 6 deletions
|
@ -1007,6 +1007,12 @@ gst_h265_decoder_set_format (GstVideoDecoder * decoder,
|
||||||
|
|
||||||
self->input_state = gst_video_codec_state_ref (state);
|
self->input_state = gst_video_codec_state_ref (state);
|
||||||
|
|
||||||
|
priv->is_live = FALSE;
|
||||||
|
query = gst_query_new_latency ();
|
||||||
|
if (gst_pad_peer_query (GST_VIDEO_DECODER_SINK_PAD (self), query))
|
||||||
|
gst_query_parse_latency (query, &priv->is_live, NULL, NULL);
|
||||||
|
gst_query_unref (query);
|
||||||
|
|
||||||
if (state->caps) {
|
if (state->caps) {
|
||||||
GstH265DecoderFormat format;
|
GstH265DecoderFormat format;
|
||||||
GstH265DecoderAlign align;
|
GstH265DecoderAlign align;
|
||||||
|
@ -1061,12 +1067,6 @@ gst_h265_decoder_set_format (GstVideoDecoder * decoder,
|
||||||
gst_buffer_unmap (state->codec_data, &map);
|
gst_buffer_unmap (state->codec_data, &map);
|
||||||
}
|
}
|
||||||
|
|
||||||
priv->is_live = FALSE;
|
|
||||||
query = gst_query_new_latency ();
|
|
||||||
if (gst_pad_peer_query (GST_VIDEO_DECODER_SINK_PAD (self), query))
|
|
||||||
gst_query_parse_latency (query, &priv->is_live, NULL, NULL);
|
|
||||||
gst_query_unref (query);
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue