self->input_state = gst_video_codec_state_ref (state);
+ /* in case live streaming, we will run on low-latency mode */
+ 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 (priv->is_live)
+ GST_DEBUG_OBJECT (self, "Live source, will run on low-latency mode");
+
if (state->caps) {
GstH264DecoderFormat format;
GstH264DecoderAlign align;
gst_buffer_unmap (state->codec_data, &map);
}
- /* in case live streaming, we will run on low-latency mode */
- 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 (priv->is_live)
- GST_DEBUG_OBJECT (self, "Live source, will run on low-latency mode");
-
return TRUE;
}