@ -366,13 +366,6 @@ scrcpy(const struct scrcpy_options *options) {
stream_init ( & stream , server . video_socket , dec , rec ) ;
stream_init ( & stream , server . video_socket , dec , rec ) ;
// now we consumed the header values, the socket receives the video stream
// start the stream
if ( ! stream_start ( & stream ) ) {
goto end ;
}
stream_started = true ;
if ( options - > display ) {
if ( options - > display ) {
if ( options - > control ) {
if ( options - > control ) {
if ( ! controller_init ( & controller , server . control_socket ) ) {
if ( ! controller_init ( & controller , server . control_socket ) ) {
@ -415,6 +408,13 @@ scrcpy(const struct scrcpy_options *options) {
}
}
}
}
// now we consumed the header values, the socket receives the video stream
// start the stream
if ( ! stream_start ( & stream ) ) {
goto end ;
}
stream_started = true ;
input_manager_init ( & input_manager , options ) ;
input_manager_init ( & input_manager , options ) ;
ret = event_loop ( options ) ;
ret = event_loop ( options ) ;