[Spice-devel] [client 2/2 v2] streaming: Don't crash if the stream creation fails
Francois Gouget
fgouget at codeweavers.com
Mon Aug 8 16:00:23 UTC 2016
For reference the crash happened in display_handle_stream_data() when
calling trying to queue the frame because video_decoder is NULL (same
sort of issue as on the server with video_encoder).
st->video_decoder->queue_frame(st->video_decoder, in, latency)
But if not there the call would happen in
display_session_mm_time_reset_cb() when calling rescheduling frames:
st->video_decoder->reschedule(st->video_decoder);
So it's simpler to just not create the stream object if we cannot create
the corresponding video decoder.
Note that currently create_gstreamer_decoder() would only fail if
gstvideo_init() fails but I'm looking at moving the create_pipeline()
call there so it only returns non-NULL if that succeeded.
--
Francois Gouget <fgouget at codeweavers.com>
More information about the Spice-devel
mailing list