mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-gtk
synced 2026-02-02 02:34:54 +00:00
streaming: Check the stream id in display_update_stream_report() too
It's safer and more consistent than assuming the caller has done the check already. Signed-off-by: Francois Gouget <fgouget@codeweavers.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
parent
a0c7e6b124
commit
ef9538efd3
@ -1222,9 +1222,16 @@ void stream_display_frame(display_stream *st, SpiceMsgIn *frame_msg,
|
||||
static void display_update_stream_report(SpiceDisplayChannel *channel, uint32_t stream_id,
|
||||
uint32_t frame_time, int32_t latency)
|
||||
{
|
||||
display_stream *st = channel->priv->streams[stream_id];
|
||||
SpiceDisplayChannelPrivate *c = channel->priv;
|
||||
display_stream *st;
|
||||
guint64 now;
|
||||
|
||||
g_return_if_fail(c != NULL);
|
||||
g_return_if_fail(c->streams != NULL);
|
||||
g_return_if_fail(c->nstreams > stream_id);
|
||||
|
||||
st = channel->priv->streams[stream_id];
|
||||
|
||||
if (!st->report_is_active) {
|
||||
return;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user