[Spice-devel] [client 2/2 v2] streaming: Don't crash if the stream creation fails

Christophe Fergeau cfergeau at redhat.com
Thu Sep 1 12:58:16 UTC 2016


On Mon, Aug 08, 2016 at 06:00:23PM +0200, Francois Gouget wrote:
> 
> 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.


I'd add that to the commit log rather than having the rationale/bug
description buried in the mailing list archives.

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20160901/9ba7fa17/attachment-0001.sig>


More information about the Spice-devel mailing list